diff --git a/source/firm.c b/source/firm.c index bbefce2..dc4cf1c 100755 --- a/source/firm.c +++ b/source/firm.c @@ -52,9 +52,7 @@ void setupCFW(void){ //Attempt to read the configuration file const char configPath[] = "aurei/config.bin"; u32 config = 0, - tempConfig = (PATCH_VER << 17) | (a9lhSetup << 16); - - u32 needConfig = fileRead(&config, configPath, 3) ? 1 : 2; + needConfig = fileRead(&config, configPath, 3) ? 1 : 2; //Determine if A9LH is installed and the user has an updated sysNAND u32 updatedSys; @@ -71,6 +69,8 @@ void setupCFW(void){ updatedSys = 0; } + u32 tempConfig = (PATCH_VER << 17) | (a9lhSetup << 16); + /* If booting with A9LH, it's a MCU reboot and a previous configuration exists, try to force boot options */ if(a9lhBoot && previousFirm && needConfig == 1){ @@ -83,7 +83,7 @@ void setupCFW(void){ needConfig = 0; /* Else, force the last used boot options unless A, L or R are pressed or the no-forcing flag is set */ - } else if(!(pressed & OPTION_BUTTONS) && ((config >> 15) & 1)){ + } else if(!(pressed & OPTION_BUTTONS) && !((config >> 15) & 1)){ mode = (config >> 12) & 1; emuNAND = (config >> 13) & 3; needConfig = 0; diff --git a/source/screeninit.c b/source/screeninit.c index c7db070..77fa5ab 100644 --- a/source/screeninit.c +++ b/source/screeninit.c @@ -82,7 +82,7 @@ void initScreens(void){ *(vu32 *)0x1040049C = 0x00000000; // Disco register - for(vu32 i = 0; i < 256; i++) + for(u32 i = 0; i < 256; i++) *(vu32 *)0x10400484 = 0x10101 * i; // Bottom screen @@ -116,7 +116,7 @@ void initScreens(void){ *(vu32 *)0x1040059C = 0x00000000; // Disco register - for(vu32 i = 0; i < 256; i++) + for(u32 i = 0; i < 256; i++) *(vu32 *)0x10400584 = 0x10101 * i; // Enable backlight