From 79889c92eb0c227eb3121c42f7645405b1ba3b97 Mon Sep 17 00:00:00 2001 From: sorgelig Date: Sat, 29 Feb 2020 01:09:35 +0800 Subject: [PATCH] Give USB and CIFS location priority for games folder over root. --- file_io.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/file_io.cpp b/file_io.cpp index 8e712b1..81456aa 100644 --- a/file_io.cpp +++ b/file_io.cpp @@ -828,11 +828,6 @@ int findPrefixDir(char *dir, size_t dir_len) // /media/fat/games/ // if the core folder is not found anywhere, // it will be created in /media/fat/games/ - if (isPathDirectory(dir)) { - printf("Found existing: %s\n", dir); - return 1; - } - static char temp_dir[1024]; for (int x = 0; x < 6; x++) { @@ -865,6 +860,11 @@ int findPrefixDir(char *dir, size_t dir_len) return 1; } + if (isPathDirectory(dir)) { + printf("Found existing: %s\n", dir); + return 1; + } + snprintf(temp_dir, 1024, "%s/%s", GAMES_DIR, dir); if (isPathDirectory(temp_dir)) { printf("Found dir: %s\n", temp_dir);