Skip to content

Commit

Permalink
Update conf_sd.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Nov 16, 2023
1 parent 2887b1b commit 68e9187
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions retail/arm9/source/conf_sd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1101,30 +1101,30 @@ int loadFromSD(configuration* conf, const char *bootstrapPath) {
const bool sdPhotoFound = conf->sdNand && (access("sd:/photo", F_OK) == 0);

// Load device list
addTwlDevice(0, (sdNandFound ? (u8)0 : 0x81), 0x06, "nand", "/");
addTwlDevice(0, (u8)(sdNandFound ? 0 : 0x81), 0x06, "nand", "/");
if (!sdNandFound) {
addTwlDevice(0, (sdNandFound ? (u8)0 : 0xA1), 0x06, "nand2", "/");
addTwlDevice(0, 0xA1, 0x06, "nand2", "/");
} else {
addTwlDevice(0, (u8)0, 0x06, "sdmc", "/");
addTwlDevice(0, 0, 0x06, "sdmc", "/");
}
if (shared2len > 0) {
addTwlDevice(0, (sdNandFound ? (u8)0x08 : (u8)0x09), 0x06, "share", "nand:/shared2/0000");
addTwlDevice(0, (u8)(sdNandFound ? 0x08 : 0x09), 0x06, "share", "nand:/shared2/0000");
}
if (!sdNandFound) {
addTwlDevice(0, (u8)0, 0x06, "sdmc", "/");
addTwlDevice(0, 0, 0x06, "sdmc", "/");
}
if (romTid[0] == 'H') {
addTwlDevice(0, (sdNandFound ? (u8)0x10 : 0x11), 0x06, "shared1", "nand:/shared1");
addTwlDevice(0, (u8)(sdNandFound ? 0x10 : 0x11), 0x06, "shared1", "nand:/shared1");
if (shared2len == 0) {
addTwlDevice(0, (sdNandFound ? (u8)0x10 : 0x11), 0x06, "shared2", "nand:/shared2");
addTwlDevice(0, (u8)(sdNandFound ? 0x10 : 0x11), 0x06, "shared2", "nand:/shared2");
}
}
addTwlDevice(0, ((sdNandFound || sdPhotoFound) ? (u8)0x10 : (u8)0x31), 0x06, "photo", ((sdNandFound || sdPhotoFound) ? "sdmc:/photo" : "nand2:/photo"));
addTwlDevice(0, (u8)((sdNandFound || sdPhotoFound) ? 0x10 : 0x31), 0x06, "photo", ((sdNandFound || sdPhotoFound) ? "sdmc:/photo" : "nand2:/photo"));
if (!conf->saveOnFlashcard) {
if (strlen(conf->prvPath) < 62 && prvSize > 0) {
if (strncasecmp(conf->prvPath, "sd:", 3) != 0) {
const bool isSdmc = (strncasecmp(conf->prvPath, "sdmc:", 5) == 0);
addTwlDevice(0, ((sdNandFound || isSdmc) ? (u8)0x08 : (u8)0x09), 0x06, "dataPrv", conf->prvPath);
addTwlDevice(0, (u8)((sdNandFound || isSdmc) ? 0x08 : 0x09), 0x06, "dataPrv", conf->prvPath);
} else {
char twlPath[64];
sprintf(twlPath, "sdmc%s", conf->prvPath+2);
Expand All @@ -1135,7 +1135,7 @@ int loadFromSD(configuration* conf, const char *bootstrapPath) {
if (strlen(conf->savPath) < 62 && pubSize > 0) {
if (strncasecmp(conf->savPath, "sd:", 3) != 0) {
const bool isSdmc = (strncasecmp(conf->savPath, "sdmc:", 5) == 0);
addTwlDevice(0, ((sdNandFound || isSdmc) ? (u8)0x08 : (u8)0x09), 0x06, "dataPub", conf->savPath);
addTwlDevice(0, (u8)((sdNandFound || isSdmc) ? 0x08 : 0x09), 0x06, "dataPub", conf->savPath);
} else {
char twlPath[64];
sprintf(twlPath, "sdmc%s", conf->savPath+2);
Expand Down

0 comments on commit 68e9187

Please sign in to comment.