From 62d93636d06504e6e35d846ead03f5f0cf4f4da3 Mon Sep 17 00:00:00 2001 From: suchmememanyskill Date: Wed, 28 Jul 2021 21:52:50 +0200 Subject: [PATCH] SCRIPT_ONLY:make --Exit-- selectable so you can't accidentally power off --- source/script/parser.c | 3 +++ source/tegraexplorer/mainmenu.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/source/script/parser.c b/source/script/parser.c index 3b2ed8b..3d92de4 100644 --- a/source/script/parser.c +++ b/source/script/parser.c @@ -560,6 +560,9 @@ ParserRet_t parseScript(char* in, u32 len) { vecAdd(&staticVariableHolder, a); CreateVariableReferenceStatic((Variable_t*)(staticVariableHolder.count - 1)); op.variable = reference; + vecAdd(&lastFunc->operations, op); + op.token = EquationSeperator; + op.lineNumber = lineNumber; } } else { diff --git a/source/tegraexplorer/mainmenu.c b/source/tegraexplorer/mainmenu.c index f94aadf..52337eb 100644 --- a/source/tegraexplorer/mainmenu.c +++ b/source/tegraexplorer/mainmenu.c @@ -65,8 +65,10 @@ MenuEntry_t mainMenuEntries[] = { [MainPartitionSd] = {.optionUnion = COLORTORGB(COLOR_ORANGE), .name = "Partition the sd"}, [MainViewKeys] = {.optionUnion = COLORTORGB(COLOR_YELLOW), .name = "View dumped keys"}, [MainViewCredits] = {.optionUnion = COLORTORGB(COLOR_YELLOW), .name = "Credits"}, - #endif [MainExit] = {.optionUnion = COLORTORGB(COLOR_WHITE) | SKIPBIT, .name = "\n-- Exit --"}, + #else + [MainExit] = {.optionUnion = COLORTORGB(COLOR_WHITE), .name = "\n-- Exit --"}, + #endif [MainPowerOff] = {.optionUnion = COLORTORGB(COLOR_VIOLET), .name = "Power off"}, [MainRebootRCM] = {.optionUnion = COLORTORGB(COLOR_VIOLET), .name = "Reboot to RCM"}, [MainRebootNormal] = {.optionUnion = COLORTORGB(COLOR_VIOLET), .name = "Reboot normally"},