Skip to content

Commit

Permalink
B4DS: Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Jul 27, 2023
1 parent cf38e44 commit f164ded
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions retail/arm9/source/conf_sd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit f164ded

Please sign in to comment.