Search
lxdream.org :: lxdream/src/cocoaui/paths_osx.m :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/cocoaui/paths_osx.m
changeset 1038:f220d18c0615
prev1024:c67f2d61ab97
next1041:5fcc39857c5c
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/cocoaui/paths_osx.m Sat Jun 13 00:50:48 2009 +0000
1.2 +++ b/src/cocoaui/paths_osx.m Thu Jun 25 01:15:25 2009 +0000
1.3 @@ -26,6 +26,7 @@
1.4
1.5 static char *bundle_resource_path = NULL;
1.6 static char *bundle_plugin_path = NULL;
1.7 +static char *user_data_path = NULL;
1.8
1.9 static char *get_bundle_resource_path()
1.10 {
1.11 @@ -58,3 +59,13 @@
1.12 }
1.13 return bundle_plugin_path;
1.14 }
1.15 +
1.16 +
1.17 +const char *get_user_data_path()
1.18 +{
1.19 + if( user_data_path == NULL ) {
1.20 + char *home = getenv("HOME");
1.21 + user_data_path = g_strdup_printf( "%s/Library/Application Support/Lxdream", home );
1.22 + }
1.23 + return user_data_path;
1.24 +}
1.25 \ No newline at end of file
.