Skip to content

Commit d7e315f

Browse files
committed
Prefer $HOME/FS-UAE if it exists, otherwise use $DOCUMENTS/FS-UAE
1 parent 0de182f commit d7e315f

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

ChangeLog

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Version 3.1.x:
22

3+
* Prefer $HOME/FS-UAE if it exists, otherwise use $DOCUMENTS/FS-UAE.
34
* Support joystick_port_[port]_[gamepadinput] input mapping.
45
* Read [guid].fs-uae-controller controller configs.
56
* Fixed uaenative_library option.

src/fs-uae/paths.c

+9
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,15 @@ const char* fs_uae_base_dir(void)
175175
if (path == NULL) {
176176
path = read_custom_path("base-dir");
177177
}
178+
if (path == NULL) {
179+
gchar *path2 = g_build_filename(fs_uae_home_dir(), "FS-UAE", NULL);
180+
if (fs_path_exists(path2)) {
181+
fs_log("- using base dir $HOME/FS-UAE\n");
182+
path = path2;
183+
} else {
184+
g_free(path2);
185+
}
186+
}
178187
if (path == NULL) {
179188
fs_log("- using base dir $DOCUMENTS/FS-UAE\n");
180189
path = g_build_filename(fs_uae_documents_dir(), "FS-UAE", NULL);

0 commit comments

Comments
 (0)