diff --git a/arm9/source/godmode.c b/arm9/source/godmode.c index f2ef45a..6e3f45c 100644 --- a/arm9/source/godmode.c +++ b/arm9/source/godmode.c @@ -2643,6 +2643,11 @@ u32 ScriptRunner(int entrypoint) { InitNandCrypto(entrypoint != ENTRY_B9S); InitExtFS(); CalibrateTouchFromFlash(); // !!! this may need some further checking + + // brightness from file? + s32 brightness = -1; + if (LoadSupportFile("gm9bright.cfg", &brightness, 0x4)) + SetScreenBrightness(brightness); while (CheckButton(BOOTPAUSE_KEY)); // don't continue while these keys are held while (timer_msec( timer ) < 500); // show splash for at least 0.5 sec diff --git a/arm9/source/utils/scripting.c b/arm9/source/utils/scripting.c index e2ac83c..842f1a9 100644 --- a/arm9/source/utils/scripting.c +++ b/arm9/source/utils/scripting.c @@ -16,6 +16,7 @@ #include "png.h" #include "ips.h" #include "bps.h" +#include "pxi.h" #define _MAX_ARGS 4 @@ -1407,6 +1408,8 @@ bool run_cmd(cmd_id id, u32 flags, char** argv, char* err_str) { snprintf(fixpath, 256, "%s%s", (*argv[0] == '0') ? "sdmc" : "nand", argv[0] + 1); else strncpy(fixpath, argv[0], 256); fixpath[255] = '\0'; + PXI_DoCMD(PXI_SET_VMODE, (u32[]){1}, 1); + PXI_DoCMD(PXI_LEGACY_MODE, NULL, 0); BootFirm((FirmHeader*)(void*)firm, fixpath); while(1); } else if (err_str) snprintf(err_str, _ERR_STR_LEN, "not a bootable firm");