summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2019-01-03 19:30:41 -0800
committerMichael Pavone <pavone@retrodev.com>2019-01-03 19:30:41 -0800
commit0cd5890cd283b2ae6b5e2af37f6dde87a6bfe5e8 (patch)
treee5b0c19541dada52a8d32e6b7110b46b9a5a03b4 /util.c
parent0eef3b4680016d82feb17f6b8403c4be52b96ed9 (diff)
Fix Windows implentation of get_config_dir() so config file gets saved to the right place. Fix location for sticky_path file on all platforms
Diffstat (limited to 'util.c')
-rw-r--r--util.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/util.c b/util.c
index 7c7fd35..ea9c58c 100644
--- a/util.c
+++ b/util.c
@@ -891,7 +891,14 @@ char const *get_userdata_dir()
char const *get_config_dir()
{
- return get_userdata_dir();
+ static char* confdir;
+ if (!confdir) {
+ char const *base = get_userdata_dir();
+ if (base) {
+ confdir = alloc_concat(base, PATH_SEP "blastem");
+ }
+ }
+ return confdir;
}
#define CONFIG_PREFIX ""
#define SAVE_PREFIX ""