diff --git a/romsel_r4theme/arm9/source/main.cpp b/romsel_r4theme/arm9/source/main.cpp index f63bc06637..215484c61d 100644 --- a/romsel_r4theme/arm9/source/main.cpp +++ b/romsel_r4theme/arm9/source/main.cpp @@ -996,23 +996,6 @@ void bgOperations(bool waitFrame) { //--------------------------------------------------------------------------------- int r4Theme(void) { //--------------------------------------------------------------------------------- - graphicsInit(); - - if (sdFound()) { - statvfs("sd:/", &st[0]); - - gbaBiosFound[0] = (access("sd:/_gba/bios.bin", F_OK) == 0); - if (!gbaBiosFound[0]) gbaBiosFound[0] = (access("sd:/gba/bios.bin", F_OK) == 0); - if (!gbaBiosFound[0]) gbaBiosFound[0] = (access("sd:/bios.bin", F_OK) == 0); - } - if (flashcardFound()) { - statvfs("fat:/", &st[1]); - - gbaBiosFound[1] = (access("fat:/_gba/bios.bin", F_OK) == 0); - if (!gbaBiosFound[1]) gbaBiosFound[0] = (access("fat:/gba/bios.bin", F_OK) == 0); - if (!gbaBiosFound[1]) gbaBiosFound[0] = (access("fat:/bios.bin", F_OK) == 0); - } - // Read user name /*char *username = (char*)PersonalData->name; @@ -1023,7 +1006,7 @@ int r4Theme(void) { else username[i*2/2] = username[i*2]; }*/ - + LoadColor(); std::string filename; @@ -1031,12 +1014,28 @@ int r4Theme(void) { ms().loadSettings(); bs().loadSettings(); + graphicsInit(); + langInit(); + if (sdFound() && ms().consoleModel >= 2 && !sys().arm7SCFGLocked()) { CIniFile lumaConfig("sd:/luma/config.ini"); widescreenFound = ((access("sd:/_nds/TWiLightMenu/TwlBg/Widescreen.cxi", F_OK) == 0) && (lumaConfig.GetInt("boot", "enable_external_firm_and_modules", 0) == true)); } - langInit(); + if (sdFound()) { + statvfs("sd:/", &st[0]); + + gbaBiosFound[0] = (access("sd:/_gba/bios.bin", F_OK) == 0); + if (!gbaBiosFound[0]) gbaBiosFound[0] = (access("sd:/gba/bios.bin", F_OK) == 0); + if (!gbaBiosFound[0]) gbaBiosFound[0] = (access("sd:/bios.bin", F_OK) == 0); + } + if (flashcardFound()) { + statvfs("fat:/", &st[1]); + + gbaBiosFound[1] = (access("fat:/_gba/bios.bin", F_OK) == 0); + if (!gbaBiosFound[1]) gbaBiosFound[0] = (access("fat:/gba/bios.bin", F_OK) == 0); + if (!gbaBiosFound[1]) gbaBiosFound[0] = (access("fat:/bios.bin", F_OK) == 0); + } if (ms().theme == TWLSettings::EThemeGBC) { extern int screenBrightness;