filename | src/paths_unix.c |
changeset | 1038:f220d18c0615 |
prev | 1024:c67f2d61ab97 |
next | 1241:74f8e11ab4b8 |
author | nkeynes |
date | Thu Jun 25 01:15:25 2009 +0000 (14 years ago) |
permissions | -rw-r--r-- |
last change | Move configuration to .lxdream/lxdreamrc on *nix, Library/Application Support/Lxdream on OS X Create standard directories on first run Add current quick state to config file Refactor quick-state handling into dreamcast.c, and use the save directory |
file | annotate | diff | log | raw |
1.1 --- a/src/paths_unix.c Sat Jun 13 00:50:48 2009 +00001.2 +++ b/src/paths_unix.c Thu Jun 25 01:15:25 2009 +00001.3 @@ -17,8 +17,11 @@1.4 */1.6 #include <string.h>1.7 +#include <stdlib.h>1.8 +#include <glib/gstrfuncs.h>1.10 #include "lxdream.h"1.11 +#include "config.h"1.13 const char *get_sysconf_path()1.14 {1.15 @@ -34,3 +37,14 @@1.16 {1.17 return PACKAGE_PLUGIN_DIR;1.18 }1.19 +1.20 +static char *user_data_path = NULL;1.21 +1.22 +const char *get_user_data_path()1.23 +{1.24 + if( user_data_path == NULL ) {1.25 + char *home = getenv("HOME");1.26 + user_data_path = g_strdup_printf( "%s/.lxdream", home );1.27 + }1.28 + return user_data_path;1.29 +}1.30 \ No newline at end of file
.