mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 13:42:47 +00:00
Higher level warning for editing 0:/Nintendo
3DS/ folder
This commit is contained in:
parent
7620310b73
commit
8114a0bd26
@ -474,7 +474,7 @@ bool ShowPrompt(bool ask, const char *format, ...)
|
|||||||
#define PRNG (*(volatile u32*)0x10011000)
|
#define PRNG (*(volatile u32*)0x10011000)
|
||||||
bool ShowUnlockSequence(u32 seqlvl, const char *format, ...) {
|
bool ShowUnlockSequence(u32 seqlvl, const char *format, ...) {
|
||||||
static const int seqcolors[7] = { COLOR_STD_FONT, COLOR_BRIGHTGREEN,
|
static const int seqcolors[7] = { COLOR_STD_FONT, COLOR_BRIGHTGREEN,
|
||||||
COLOR_BRIGHTYELLOW, COLOR_ORANGE, COLOR_BRIGHTBLUE, COLOR_RED, COLOR_DARKRED };
|
COLOR_BRIGHTYELLOW, COLOR_ORANGE, COLOR_BRIGHTBLUE, COLOR_BRIGHTBLUE, COLOR_DARKRED };
|
||||||
const u32 seqlen_max = 7;
|
const u32 seqlen_max = 7;
|
||||||
const u32 seqlen = seqlen_max - ((seqlvl < 3) ? 2 : (seqlvl < 4) ? 1 : 0);
|
const u32 seqlen = seqlen_max - ((seqlvl < 3) ? 2 : (seqlvl < 4) ? 1 : 0);
|
||||||
|
|
||||||
@ -499,7 +499,7 @@ bool ShowUnlockSequence(u32 seqlvl, const char *format, ...) {
|
|||||||
x = (str_width >= SCREEN_WIDTH_MAIN) ? 0 : (SCREEN_WIDTH_MAIN - str_width) / 2;
|
x = (str_width >= SCREEN_WIDTH_MAIN) ? 0 : (SCREEN_WIDTH_MAIN - str_width) / 2;
|
||||||
y = (str_height >= SCREEN_HEIGHT) ? 0 : (SCREEN_HEIGHT - str_height) / 2;
|
y = (str_height >= SCREEN_HEIGHT) ? 0 : (SCREEN_HEIGHT - str_height) / 2;
|
||||||
|
|
||||||
if (seqlvl >= 6) { // special handling
|
if (seqlvl >= 5) { // special handling
|
||||||
color_bg = seqcolors[seqlvl];
|
color_bg = seqcolors[seqlvl];
|
||||||
color_font = COLOR_BLACK;
|
color_font = COLOR_BLACK;
|
||||||
color_off = COLOR_BLACK;
|
color_off = COLOR_BLACK;
|
||||||
|
@ -175,10 +175,6 @@ bool SetWritePermissions(u32 perm, bool add_perm) {
|
|||||||
if (!ShowUnlockSequence(2, "You want to enable SysNAND\nlvl1 writing permissions.\n \nThis enables you to modify\nsystem data, installations,\nuser data & savegames."))
|
if (!ShowUnlockSequence(2, "You want to enable SysNAND\nlvl1 writing permissions.\n \nThis enables you to modify\nsystem data, installations,\nuser data & savegames."))
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case PERM_SDDATA:
|
|
||||||
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:
|
case PERM_CART:
|
||||||
if (!ShowUnlockSequence(2, "You want to enable gamecart\nsave writing permissions."))
|
if (!ShowUnlockSequence(2, "You want to enable gamecart\nsave writing permissions."))
|
||||||
return false;
|
return false;
|
||||||
@ -192,6 +188,10 @@ bool SetWritePermissions(u32 perm, bool add_perm) {
|
|||||||
if (!ShowUnlockSequence(4, "!Better be careful!\n \nYou want to enable memory\nwriting permissions.\n \nWriting to certain areas may\nlead to unexpected results."))
|
if (!ShowUnlockSequence(4, "!Better be careful!\n \nYou want to enable memory\nwriting permissions.\n \nWriting to certain areas may\nlead to unexpected results."))
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
case PERM_SDDATA:
|
||||||
|
if (!ShowUnlockSequence(5, "!THIS IS NOT RECOMMENDED!\n \nYou want to enable SD data\nwriting permissions.\n \nEverything here is encrypted.\nIt is recommended to use the\nA:/B: drives for modification\nof installations, user data &\nsavegames instead."))
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
case PERM_SYS_LVL3:
|
case PERM_SYS_LVL3:
|
||||||
if (!ShowUnlockSequence(6, "!THIS IS YOUR ONLY WARNING!\n \nYou want to enable SysNAND\nlvl3 writing permissions.\n \nThis enables you to OVERWRITE\nyour bootloader installation,\nessential system files and/or\nBRICK your console!"))
|
if (!ShowUnlockSequence(6, "!THIS IS YOUR ONLY WARNING!\n \nYou want to enable SysNAND\nlvl3 writing permissions.\n \nThis enables you to OVERWRITE\nyour bootloader installation,\nessential system files and/or\nBRICK your console!"))
|
||||||
return false;
|
return false;
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#define PERM_BASE (PERM_SDCARD | PERM_IMAGE | PERM_RAMDRIVE | PERM_EMU_LVL0 | PERM_SYS_LVL0)
|
#define PERM_BASE (PERM_SDCARD | PERM_IMAGE | PERM_RAMDRIVE | PERM_EMU_LVL0 | PERM_SYS_LVL0)
|
||||||
|
|
||||||
// permission levels / colors
|
// permission levels / colors
|
||||||
#define PERM_BLUE (GetWritePermissions()&PERM_MEMORY)
|
#define PERM_BLUE (GetWritePermissions()&(PERM_MEMORY|(PERM_SDDATA&~PERM_SDCARD)))
|
||||||
#define PERM_RED (GetWritePermissions()&(PERM_SYS_LVL3&~PERM_SYS_LVL2))
|
#define PERM_RED (GetWritePermissions()&(PERM_SYS_LVL3&~PERM_SYS_LVL2))
|
||||||
#define PERM_ORANGE (GetWritePermissions()&(PERM_SYS_LVL2&~PERM_SYS_LVL1))
|
#define PERM_ORANGE (GetWritePermissions()&(PERM_SYS_LVL2&~PERM_SYS_LVL1))
|
||||||
#define PERM_YELLOW (GetWritePermissions()&((PERM_SYS_LVL1&~PERM_SYS_LVL0)|(PERM_EMU_LVL1&~PERM_EMU_LVL0)|(PERM_SDDATA&~PERM_SDCARD)|PERM_CART))
|
#define PERM_YELLOW (GetWritePermissions()&((PERM_SYS_LVL1&~PERM_SYS_LVL0)|(PERM_EMU_LVL1&~PERM_EMU_LVL0)|(PERM_SDDATA&~PERM_SDCARD)|PERM_CART))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user