From 68e91875d8e88ad887bb3a37b4084a6931ad6f47 Mon Sep 17 00:00:00 2001 From: RocketRobz Date: Thu, 16 Nov 2023 15:18:08 -0700 Subject: [PATCH] Update conf_sd.cpp --- retail/arm9/source/conf_sd.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/retail/arm9/source/conf_sd.cpp b/retail/arm9/source/conf_sd.cpp index 63ad32f87..e0c1514a9 100644 --- a/retail/arm9/source/conf_sd.cpp +++ b/retail/arm9/source/conf_sd.cpp @@ -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); @@ -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);