Skip to content

Commit

Permalink
SD Card: Fix Bootstrap File per-game setting not used
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Jun 16, 2024
1 parent 20a1362 commit d28f7f3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions SD_Card/sd/arm9/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -922,8 +922,9 @@ int main(int argc, char **argv) {
bootstrapini.SetInt("NDS-BOOTSTRAP", "REGION", gameSettings.region == -3 ? region : gameSettings.region);
bootstrapini.SaveIniFile( bootstrapIniPath );

const bool perGameBootstrapFile = (gameSettings.bootstrapFile == -1 ? bootstrapFile : gameSettings.bootstrapFile);
if (isHomebrew == 1) {
const char *argarray[] = {bootstrapFile ? "sd:/_nds/nds-bootstrap-hb-nightly.nds" : "sd:/_nds/nds-bootstrap-hb-release.nds"};
const char *argarray[] = {perGameBootstrapFile ? "sd:/_nds/nds-bootstrap-hb-nightly.nds" : "sd:/_nds/nds-bootstrap-hb-release.nds"};
int err = runNdsFile(argarray[0], sizeof(argarray) / sizeof(argarray[0]), argarray);
if (!consoleInited) {
consoleDemoInit();
Expand All @@ -933,7 +934,7 @@ int main(int argc, char **argv) {
iprintf("Start failed. Error %i\n", err);
if (err == 1) iprintf ("nds-bootstrap (hb) not found.\n");
} else {
const char *argarray[] = {isRunFromSd ? (bootstrapFile ? "sd:/_nds/nds-bootstrap-nightly.nds" : "sd:/_nds/nds-bootstrap-release.nds") : (bootstrapFile ? "fat:/_nds/nds-bootstrap-nightly.nds" : "fat:/_nds/nds-bootstrap-release.nds")};
const char *argarray[] = {isRunFromSd ? (perGameBootstrapFile ? "sd:/_nds/nds-bootstrap-nightly.nds" : "sd:/_nds/nds-bootstrap-release.nds") : (perGameBootstrapFile ? "fat:/_nds/nds-bootstrap-nightly.nds" : "fat:/_nds/nds-bootstrap-release.nds")};
int err = runNdsFile(argarray[0], sizeof(argarray) / sizeof(argarray[0]), argarray);
if (!consoleInited) {
consoleDemoInit();
Expand Down

0 comments on commit d28f7f3

Please sign in to comment.