forked from Mirror/GodMode9
More intuitive non-unlockable handling, fixes #128
This commit is contained in:
parent
748b77ad9c
commit
bba9c13506
@ -87,11 +87,18 @@ bool CheckWritePermissions(const char* path) {
|
||||
if ((write_permissions & perm) == perm)
|
||||
return true;
|
||||
|
||||
// ask the user
|
||||
if (!ShowPrompt(true, "Writing to %s is locked!\nUnlock it now?", area_name))
|
||||
return false;
|
||||
|
||||
return SetWritePermissions(perm, true);
|
||||
// offer unlock if possible
|
||||
if (!(perm & (PERM_CART|PERM_GAME|PERM_XORPAD))) {
|
||||
// ask the user
|
||||
if (!ShowPrompt(true, "Writing to %s is locked!\nUnlock it now?", area_name))
|
||||
return false;
|
||||
|
||||
return SetWritePermissions(perm, true);
|
||||
}
|
||||
|
||||
// unlock not possible
|
||||
ShowPrompt(false, "Unlock write permission for\n%s is not allowed.", area_name);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CheckDirWritePermissions(const char* path) {
|
||||
@ -149,18 +156,6 @@ bool SetWritePermissions(u32 perm, bool add_perm) {
|
||||
if (!ShowUnlockSequence(2, "You want to enable SD data\nwriting permissions.\n \nThis enables you to modify\ninstallations, user data &\nsavegames."))
|
||||
return false;
|
||||
break;
|
||||
case PERM_CART:
|
||||
ShowPrompt(false, "Unlock write permission for\ngame carts is not allowed.");
|
||||
return false;
|
||||
break;
|
||||
case PERM_GAME:
|
||||
ShowPrompt(false, "Unlock write permission for\ngame images is not allowed.");
|
||||
return false;
|
||||
break;
|
||||
case PERM_XORPAD:
|
||||
ShowPrompt(false, "Unlock write permission for\nXORpad drive is not allowed.");
|
||||
return false;
|
||||
break;
|
||||
#ifndef SAFEMODE
|
||||
case PERM_SYS_LVL2:
|
||||
if (!ShowUnlockSequence(3, "!Better be careful!\n \nYou want to enable SysNAND\nlvl2 writing permissions.\n \nThis enables you to modify\nirrecoverable system data!"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user