From f164ded10a1c489154156830cd2e97ca4f7f9a1d Mon Sep 17 00:00:00 2001 From: RocketRobz Date: Thu, 27 Jul 2023 15:21:57 -0600 Subject: [PATCH] B4DS: Bug fix --- retail/arm9/source/conf_sd.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/retail/arm9/source/conf_sd.cpp b/retail/arm9/source/conf_sd.cpp index acbb99290..74ffa3053 100644 --- a/retail/arm9/source/conf_sd.cpp +++ b/retail/arm9/source/conf_sd.cpp @@ -1653,19 +1653,18 @@ int loadFromSD(configuration* conf, const char *bootstrapPath) { FILE* donorNdsFile = NULL; bool standaloneDonor = false; if (a7mbk6 == 0x080037C0) { - const bool sdk50 = (ndsArm7Size == 0x1511C || ndsArm7Size == 0x26CC8 || ndsArm7Size == 0x28E54); - donorNdsFile = fopen(sdk50 ? conf->donorTwl0Path : conf->donorTwlPath, "rb"); - if (!donorNdsFile) { - FILE* donorNdsFile2 = fopen(sdk50 ? conf->donorTwlPath : conf->donorTwl0Path, "rb"); - if (donorNdsFile2) { - donorNdsFile = donorNdsFile2; - } + FILE* donorNdsFile = fopen("fat:/_nds/nds-bootstrap/b4dsTwlDonor.bin", "rb"); + if (donorNdsFile) { + standaloneDonor = true; } if (!donorNdsFile) { - FILE* donorNdsFile2 = fopen("fat:/_nds/nds-bootstrap/b4dsTwlDonor.bin", "rb"); - if (donorNdsFile2) { - donorNdsFile = donorNdsFile2; - standaloneDonor = true; + const bool sdk50 = (ndsArm7Size == 0x1511C || ndsArm7Size == 0x26CC8 || ndsArm7Size == 0x28E54); + donorNdsFile = fopen(sdk50 ? conf->donorTwl0Path : conf->donorTwlPath, "rb"); + if (!donorNdsFile) { + FILE* donorNdsFile2 = fopen(sdk50 ? conf->donorTwlPath : conf->donorTwl0Path, "rb"); + if (donorNdsFile2) { + donorNdsFile = donorNdsFile2; + } } } if (!donorNdsFile) {