Only run fatInitDefault if arm7 SCFG is locked

This commit is contained in:
RocketRobz 2018-10-11 19:24:47 -06:00
parent 0d7cbe8868
commit e2b1743064
3 changed files with 6 additions and 2 deletions

View File

@ -4,6 +4,7 @@
#include <sys/stat.h>
#include <stdio.h>
#include "main.h"
#include "dldi-include.h"
static sNDSHeader nds;
@ -200,7 +201,7 @@ bool flashcardMount(void) {
fatGetVolumeLabel("fat", fatLabel);
fixLabel(true);
return true;
} else if (!sdMountedDone) {
} else if ((!isDSiMode()) || (arm7SCFGLocked && !sdMountedDone)) {
fatInitDefault();
if (flashcardFound()) {
fatGetVolumeLabel("fat", fatLabel);

View File

@ -40,6 +40,7 @@ char titleName[32] = {" "};
int screenMode = 0;
bool arm7SCFGLocked = false;
bool isRegularDS = true;
bool is3DS = true;
@ -114,6 +115,7 @@ int main(int argc, char **argv) {
}
fifoWaitValue32(FIFO_USER_06);
if (fifoGetValue32(FIFO_USER_03) == 0) arm7SCFGLocked = true;
u16 arm7_SNDEXCNT = fifoGetValue32(FIFO_USER_07);
if (arm7_SNDEXCNT != 0) isRegularDS = false; // If sound frequency setting is found, then the console is not a DS Phat/Lite
fifoSendValue32(FIFO_USER_07, 0);
@ -134,7 +136,7 @@ int main(int argc, char **argv) {
}
sdMounted = sdMount();
}
if (!sdMounted || (access("sd:/Nintendo 3DS", F_OK) != 0)) {
if (!isDSiMode() || !sdMounted || (access("sd:/Nintendo 3DS", F_OK) != 0)) {
is3DS = false;
}
if (!isDSiMode() || !yHeld) {

View File

@ -8,6 +8,7 @@ extern char titleName[32];
extern int screenMode;
extern bool arm7SCFGLocked;
extern bool isRegularDS;
extern bool is3DS;