mirror of
https://github.com/rvtr/GodMode9i.git
synced 2025-11-02 00:11:07 -04:00
Fix for DSi-mode flashcards (CycloDS iEvo)
This commit is contained in:
parent
92555268ab
commit
0d7cbe8868
@ -174,7 +174,7 @@ void driveMenu (void) {
|
|||||||
printf ("[nitro:] NDS GAME IMAGE\n");
|
printf ("[nitro:] NDS GAME IMAGE\n");
|
||||||
printf ("(Game Virtual)");
|
printf ("(Game Virtual)");
|
||||||
}
|
}
|
||||||
if (isDSiMode()) {
|
if (isDSiMode() && sdMountedDone) {
|
||||||
if (sdMounted) {
|
if (sdMounted) {
|
||||||
printf ("\x1b[21;0H");
|
printf ("\x1b[21;0H");
|
||||||
printf (titleName);
|
printf (titleName);
|
||||||
@ -312,7 +312,7 @@ void driveMenu (void) {
|
|||||||
// Unmount/Remount SD card
|
// Unmount/Remount SD card
|
||||||
if ((held & KEY_R) && (pressed & KEY_B)) {
|
if ((held & KEY_R) && (pressed & KEY_B)) {
|
||||||
dmTextPrinted = false;
|
dmTextPrinted = false;
|
||||||
if (isDSiMode()) {
|
if (isDSiMode() && sdMountedDone) {
|
||||||
if (sdMounted) {
|
if (sdMounted) {
|
||||||
sdUnmount();
|
sdUnmount();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,6 +11,7 @@ static sNDSHeader nds;
|
|||||||
u8 stored_SCFG_MC = 0;
|
u8 stored_SCFG_MC = 0;
|
||||||
|
|
||||||
bool sdMounted = false;
|
bool sdMounted = false;
|
||||||
|
bool sdMountedDone = false; // true if SD mount is successful once
|
||||||
bool flashcardMounted = false;
|
bool flashcardMounted = false;
|
||||||
bool nitroMounted = false;
|
bool nitroMounted = false;
|
||||||
|
|
||||||
@ -69,6 +70,7 @@ bool bothSDandFlashcard(void) {
|
|||||||
TWL_CODE bool sdMount(void) {
|
TWL_CODE bool sdMount(void) {
|
||||||
fatMountSimple("sd", get_io_dsisd());
|
fatMountSimple("sd", get_io_dsisd());
|
||||||
if (sdFound()) {
|
if (sdFound()) {
|
||||||
|
sdMountedDone = true;
|
||||||
fatGetVolumeLabel("sd", sdLabel);
|
fatGetVolumeLabel("sd", sdLabel);
|
||||||
fixLabel(false);
|
fixLabel(false);
|
||||||
return true;
|
return true;
|
||||||
@ -198,7 +200,7 @@ bool flashcardMount(void) {
|
|||||||
fatGetVolumeLabel("fat", fatLabel);
|
fatGetVolumeLabel("fat", fatLabel);
|
||||||
fixLabel(true);
|
fixLabel(true);
|
||||||
return true;
|
return true;
|
||||||
} else if (!isDSiMode()) {
|
} else if (!sdMountedDone) {
|
||||||
fatInitDefault();
|
fatInitDefault();
|
||||||
if (flashcardFound()) {
|
if (flashcardFound()) {
|
||||||
fatGetVolumeLabel("fat", fatLabel);
|
fatGetVolumeLabel("fat", fatLabel);
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
extern u8 stored_SCFG_MC;
|
extern u8 stored_SCFG_MC;
|
||||||
|
|
||||||
extern bool sdMounted;
|
extern bool sdMounted;
|
||||||
|
extern bool sdMountedDone; // true if SD mount is successful once
|
||||||
extern bool flashcardMounted;
|
extern bool flashcardMounted;
|
||||||
extern bool nitroMounted;
|
extern bool nitroMounted;
|
||||||
|
|
||||||
|
|||||||
@ -133,10 +133,8 @@ int main(int argc, char **argv) {
|
|||||||
yHeld = true;
|
yHeld = true;
|
||||||
}
|
}
|
||||||
sdMounted = sdMount();
|
sdMounted = sdMount();
|
||||||
if (access("sd:/Nintendo 3DS", F_OK) != 0) {
|
}
|
||||||
is3DS = false;
|
if (!sdMounted || (access("sd:/Nintendo 3DS", F_OK) != 0)) {
|
||||||
}
|
|
||||||
} else {
|
|
||||||
is3DS = false;
|
is3DS = false;
|
||||||
}
|
}
|
||||||
if (!isDSiMode() || !yHeld) {
|
if (!isDSiMode() || !yHeld) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user