Fix for DSi-mode flashcards (CycloDS iEvo)

This commit is contained in:
RocketRobz 2018-10-11 18:07:49 -06:00
parent 92555268ab
commit 0d7cbe8868
4 changed files with 8 additions and 7 deletions

View File

@ -174,7 +174,7 @@ void driveMenu (void) {
printf ("[nitro:] NDS GAME IMAGE\n");
printf ("(Game Virtual)");
}
if (isDSiMode()) {
if (isDSiMode() && sdMountedDone) {
if (sdMounted) {
printf ("\x1b[21;0H");
printf (titleName);
@ -312,7 +312,7 @@ void driveMenu (void) {
// Unmount/Remount SD card
if ((held & KEY_R) && (pressed & KEY_B)) {
dmTextPrinted = false;
if (isDSiMode()) {
if (isDSiMode() && sdMountedDone) {
if (sdMounted) {
sdUnmount();
}

View File

@ -11,6 +11,7 @@ static sNDSHeader nds;
u8 stored_SCFG_MC = 0;
bool sdMounted = false;
bool sdMountedDone = false; // true if SD mount is successful once
bool flashcardMounted = false;
bool nitroMounted = false;
@ -69,6 +70,7 @@ bool bothSDandFlashcard(void) {
TWL_CODE bool sdMount(void) {
fatMountSimple("sd", get_io_dsisd());
if (sdFound()) {
sdMountedDone = true;
fatGetVolumeLabel("sd", sdLabel);
fixLabel(false);
return true;
@ -198,7 +200,7 @@ bool flashcardMount(void) {
fatGetVolumeLabel("fat", fatLabel);
fixLabel(true);
return true;
} else if (!isDSiMode()) {
} else if (!sdMountedDone) {
fatInitDefault();
if (flashcardFound()) {
fatGetVolumeLabel("fat", fatLabel);

View File

@ -4,6 +4,7 @@
extern u8 stored_SCFG_MC;
extern bool sdMounted;
extern bool sdMountedDone; // true if SD mount is successful once
extern bool flashcardMounted;
extern bool nitroMounted;

View File

@ -133,10 +133,8 @@ int main(int argc, char **argv) {
yHeld = true;
}
sdMounted = sdMount();
if (access("sd:/Nintendo 3DS", F_OK) != 0) {
is3DS = false;
}
} else {
}
if (!sdMounted || (access("sd:/Nintendo 3DS", F_OK) != 0)) {
is3DS = false;
}
if (!isDSiMode() || !yHeld) {