Make loader recognize SD/CTRNAND modes and only look in the appropriate one
This commit is contained in:
@@ -72,7 +72,7 @@ void writeConfig(bool isPayloadLaunch)
|
||||
error("Error writing the configuration file");
|
||||
}
|
||||
|
||||
void configMenu(bool isSdMode, bool oldPinStatus, u32 oldPinMode)
|
||||
void configMenu(bool oldPinStatus, u32 oldPinMode)
|
||||
{
|
||||
const char *multiOptionsText[] = { "Default EmuNAND: 1( ) 2( ) 3( ) 4( )",
|
||||
"Screen brightness: 4( ) 3( ) 2( ) 1( )",
|
||||
|
||||
@@ -67,4 +67,4 @@ typedef enum ConfigurationStatus
|
||||
|
||||
bool readConfig(void);
|
||||
void writeConfig(bool isPayloadLaunch);
|
||||
void configMenu(bool isSdMode, bool oldPinStatus, u32 oldPinMode);
|
||||
void configMenu(bool oldPinStatus, u32 oldPinMode);
|
||||
|
||||
@@ -219,7 +219,7 @@ void loadPayload(u32 pressed, const char *payloadPath)
|
||||
|
||||
writeConfig(true);
|
||||
|
||||
if(memcmp(launchedPath, u"nand", 8) == 0)
|
||||
if(!isSdMode)
|
||||
sprintf(absPath, "nand:/rw/luma/%s", path);
|
||||
else
|
||||
sprintf(absPath, "sdmc:/luma/%s", path);
|
||||
|
||||
@@ -38,7 +38,8 @@ extern CfgData configData;
|
||||
extern ConfigurationStatus needConfig;
|
||||
extern FirmwareSource firmSource;
|
||||
|
||||
bool isFirmlaunch;
|
||||
bool isFirmlaunch,
|
||||
isSdMode;
|
||||
u16 launchedPath[41];
|
||||
|
||||
void main(int argc, char **argv)
|
||||
@@ -85,9 +86,6 @@ void main(int argc, char **argv)
|
||||
break;
|
||||
}
|
||||
|
||||
//Mount SD or CTRNAND
|
||||
bool isSdMode;
|
||||
|
||||
if(memcmp(launchedPath, u"sdmc", 8) == 0)
|
||||
{
|
||||
if(!mountFs(true, false)) error("Failed to mount SD.");
|
||||
@@ -182,7 +180,7 @@ void main(int argc, char **argv)
|
||||
|
||||
if(shouldLoadConfigMenu)
|
||||
{
|
||||
configMenu(isSdMode, pinExists, pinMode);
|
||||
configMenu(pinExists, pinMode);
|
||||
|
||||
//Update pressed buttons
|
||||
pressed = HID_PAD;
|
||||
|
||||
@@ -313,6 +313,7 @@ u32 implementSvcGetCFWInfo(u8 *pos, u32 *arm11SvcTable, u32 baseK11VA, u8 **free
|
||||
if(isRelease) info->flags = 1;
|
||||
if(ISN3DS) info->flags |= 1 << 4;
|
||||
if(isSafeMode) info->flags |= 1 << 5;
|
||||
if(isSdMode) info->flags |= 1 << 6;
|
||||
|
||||
arm11SvcTable[0x2E] = baseK11VA + *freeK11Space - pos; //Stubbed svc
|
||||
*freeK11Space += svcGetCFWInfo_bin_size;
|
||||
|
||||
@@ -110,7 +110,8 @@ typedef enum FirmwareType
|
||||
NATIVE_FIRM1X2X
|
||||
} FirmwareType;
|
||||
|
||||
extern bool isFirmlaunch;
|
||||
extern bool isFirmlaunch,
|
||||
isSdMode;
|
||||
extern u16 launchedFirmTidLow[8];
|
||||
extern u16 launchedPath[41];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user