aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBassAceGold2013-02-20 14:53:13 -0500
committerNebuleon Fumika2013-02-20 14:53:13 -0500
commit10ed45ad763a8385f6d34a96a94f2c3b1b23a6f1 (patch)
tree432c268a8710bd2071fe457265c7d04e56fd830a
parentedda8744adae4ae0cbb8453e0c6753d489a5985a (diff)
downloadsnes9x2005-10ed45ad763a8385f6d34a96a94f2c3b1b23a6f1.tar.gz
snes9x2005-10ed45ad763a8385f6d34a96a94f2c3b1b23a6f1.tar.bz2
snes9x2005-10ed45ad763a8385f6d34a96a94f2c3b1b23a6f1.zip
Use the CATSFC directory in the root of the storage card if a SYSTEM/GUI directory is not found in the system folder provided by plugin arguments.
-rw-r--r--source/nds/gui.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/nds/gui.c b/source/nds/gui.c
index 7d114c0..d9575c0 100644
--- a/source/nds/gui.c
+++ b/source/nds/gui.c
@@ -5009,6 +5009,17 @@ void gui_init(u32 lang_id)
//strip off the binary name
char *endStr = strrchr(main_path, '/');
*endStr = '\0';
+
+ //do a check to make sure the folder is a valid CATSFC folder
+ char tempPath[MAX_PATH];
+ strcpy(tempPath, main_path);
+ strcat(tempPath, "/system/gui");
+ DIR *testDir = opendir(tempPath);
+ if(!testDir)
+ //not a valid CATSFC install
+ strcpy(main_path, "fat:/CATSFC");
+ else //test was successful, do nothing
+ closedir(testDir);
}
else
strcpy(main_path, "fat:/CATSFC");