mirror of
https://github.com/rvtr/GodMode9i.git
synced 2025-11-02 00:11:07 -04:00
Add Nitro/IMG unmounting
This commit is contained in:
parent
2a43eb2370
commit
999241b0a0
@ -165,6 +165,10 @@ void dm_drawBottomScreen(void) {
|
||||
printf ("\x1B[47m"); // Print foreground white color
|
||||
printf ("\x1b[23;0H");
|
||||
printf (titleName);
|
||||
if (nitroMounted || imgMounted) {
|
||||
printf ("\n");
|
||||
printf (IMAGETEXT);
|
||||
}
|
||||
if (isDSiMode() && sdMountedDone) {
|
||||
if (isRegularDS || sdMounted) {
|
||||
printf ("\n");
|
||||
@ -409,6 +413,20 @@ void driveMenu (void) {
|
||||
}
|
||||
}
|
||||
|
||||
// Unmount/Remount FAT image
|
||||
if ((held & KEY_R) && (pressed & KEY_X)) {
|
||||
dmTextPrinted = false;
|
||||
if (nitroMounted) {
|
||||
currentDrive = 5;
|
||||
chdir("nitro:/");
|
||||
nitroUnmount();
|
||||
} else if (imgMounted) {
|
||||
currentDrive = 6;
|
||||
chdir("img:/");
|
||||
imgUnmount();
|
||||
}
|
||||
}
|
||||
|
||||
// Unmount/Remount SD card
|
||||
if ((held & KEY_R) && (pressed & KEY_B)) {
|
||||
dmTextPrinted = false;
|
||||
|
||||
@ -344,6 +344,11 @@ TWL_CODE void ramdrive2Mount(void) {
|
||||
ramdrive2Mounted = (access("ram2:/", F_OK) == 0);
|
||||
}
|
||||
|
||||
void nitroUnmount(void) {
|
||||
fatUnmount("nitro");
|
||||
nitroMounted = false;
|
||||
}
|
||||
|
||||
bool imgMount(const char* imgName) {
|
||||
extern const char* currentImgName;
|
||||
|
||||
|
||||
@ -41,6 +41,7 @@ extern bool flashcardMount(void);
|
||||
extern void flashcardUnmount(void);
|
||||
extern void ramdrive1Mount(void);
|
||||
extern void ramdrive2Mount(void);
|
||||
extern void nitroUnmount(void);
|
||||
extern bool imgMount(const char* imgName);
|
||||
extern void imgUnmount(void);
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
#define POWERTEXT "POWER - Reboot/[+held] Poweroff"
|
||||
#define POWERTEXT_3DS "POWER - Sleep Mode screen"
|
||||
#define HOMETEXT "HOME - HOME Menu prompt"
|
||||
#define IMAGETEXT "R+X - Unmount image"
|
||||
#define SCREENSHOTTEXT "R+L - Make a screenshot"
|
||||
|
||||
extern char titleName[32];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user