Search
lxdream.org :: lxdream/src/paths_unix.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/paths_unix.c
changeset 1038:f220d18c0615
prev1024:c67f2d61ab97
next1241:74f8e11ab4b8
author nkeynes
date Thu Jun 25 01:15:25 2009 +0000 (10 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 +0000
1.2 +++ b/src/paths_unix.c Thu Jun 25 01:15:25 2009 +0000
1.3 @@ -17,8 +17,11 @@
1.4 */
1.5
1.6 #include <string.h>
1.7 +#include <stdlib.h>
1.8 +#include <glib/gstrfuncs.h>
1.9
1.10 #include "lxdream.h"
1.11 +#include "config.h"
1.12
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
.