mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 13:42:47 +00:00
Allow coyping between image virtual <-> other virtual
This commit is contained in:
parent
c641da35f0
commit
393b764945
@ -42,8 +42,7 @@ bool InitExtFS() {
|
||||
}
|
||||
|
||||
void DeinitExtFS() {
|
||||
MountImage(NULL);
|
||||
for (u32 i = NORM_FS; i > 0; i--) {
|
||||
for (u32 i = NORM_FS - 1; i > 0; i--) {
|
||||
if (fs_mounted[i]) {
|
||||
char fsname[8];
|
||||
snprintf(fsname, 7, "%lu:", i);
|
||||
@ -79,7 +78,8 @@ bool CheckWritePermissions(const char* path) {
|
||||
if (pdrv < 0) {
|
||||
if (GetVirtualSource(path)) // this is a hack, but okay for now
|
||||
pdrv = (GetVirtualSource(path) == VRT_MEMORY) ? 10 :
|
||||
(GetVirtualSource(path) == VRT_SYSNAND) ? 1 : 4;
|
||||
(GetVirtualSource(path) == VRT_SYSNAND) ? 1 :
|
||||
(GetVirtualSource(path) == VRT_EMUNAND) ? 4 : 7;
|
||||
else return false;
|
||||
}
|
||||
|
||||
@ -100,7 +100,7 @@ bool CheckWritePermissions(const char* path) {
|
||||
return SetWritePermissions(1);
|
||||
return false;
|
||||
} else if (pdrv >= 10) {
|
||||
ShowPrompt(false, "Writing to memory is forbidden!");
|
||||
ShowPrompt(false, "Writing to memory is not allowed!");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -291,6 +291,7 @@ u32 GodMode() {
|
||||
if ((GetUnitPlatform() == PLATFORM_N3DS) && !CheckSlot0x05Crypto()) {
|
||||
if (!ShowPrompt(true, "Warning: slot0x05 crypto fail!\nCould not set up slot0x05keyY.\nContinue?")) {
|
||||
DeinitExtFS();
|
||||
MountImage(NULL);
|
||||
DeinitSDCardFS();
|
||||
return exit_mode;
|
||||
}
|
||||
@ -367,6 +368,7 @@ u32 GodMode() {
|
||||
}
|
||||
} else if (switched && (pad_state & BUTTON_B)) { // unmount SD card
|
||||
DeinitExtFS();
|
||||
MountImage(NULL);
|
||||
DeinitSDCardFS();
|
||||
clipboard->n_entries = 0;
|
||||
memset(panedata, 0x00, N_PANES * sizeof(PaneData));
|
||||
@ -531,6 +533,7 @@ u32 GodMode() {
|
||||
}
|
||||
|
||||
DeinitExtFS();
|
||||
MountImage(NULL);
|
||||
DeinitSDCardFS();
|
||||
|
||||
return exit_mode;
|
||||
|
Loading…
x
Reference in New Issue
Block a user