Mercurial > repos > blastem
diff util.c @ 1673:ab3b465c052c
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
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 03 Jan 2019 19:30:41 -0800 |
parents | 137dbd05ceab |
children | c362f2c7766a |
line wrap: on
line diff
--- a/util.c Thu Jan 03 09:14:49 2019 -0800 +++ b/util.c Thu Jan 03 19:30:41 2019 -0800 @@ -891,7 +891,14 @@ 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 ""