From 10ed45ad763a8385f6d34a96a94f2c3b1b23a6f1 Mon Sep 17 00:00:00 2001 From: BassAceGold Date: Wed, 20 Feb 2013 14:53:13 -0500 Subject: 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. --- source/nds/gui.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source/nds') 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"); -- cgit v1.2.3