mirror of
https://github.com/suchmememanyskill/TegraExplorer.git
synced 2024-11-26 05:42:07 +00:00
Ajust warning message
This commit is contained in:
parent
f812818967
commit
ed8987ee50
2 changed files with 94 additions and 10 deletions
|
@ -3,22 +3,92 @@ is=["8000000000000120","8000000000000000"]
|
||||||
p=println
|
p=println
|
||||||
pr=print
|
pr=print
|
||||||
pe={pause() exit()}
|
pe={pause() exit()}
|
||||||
wait={t=timer()while(timer()<(t+tw)){print("Wait for",(t+tw-timer()/1000),"seconds \r")}}
|
|
||||||
p("System wiper\n")
|
p("System wiper\n")
|
||||||
op=["Exit","Wipe sysmmc"].copy()
|
op=["Exit","Wipe sysmmc"].copy()
|
||||||
if (emu()){op+"Wipe emummc"}
|
if (emu()){op+"Wipe emummc"}
|
||||||
r=menu(op,0)clear()
|
r=menu(op,0)clear()
|
||||||
if(r==0){exit()}
|
if(r==0){exit()}
|
||||||
if(r==1){p("Selected sysmmc")mount=mountsys}
|
if(r==1){
|
||||||
if(r==2){p("Selected emummc")mount=mountemu}
|
mount=mountsys
|
||||||
|
selected_target = "sysmmc"
|
||||||
|
}
|
||||||
|
if(r==2){
|
||||||
|
mount=mountemu
|
||||||
|
selected_target = "emummc"
|
||||||
|
}
|
||||||
if(mount("SYSTEM")){p("Mount failed!")pe()}
|
if(mount("SYSTEM")){p("Mount failed!")pe()}
|
||||||
color(0xFF0000)
|
clear()
|
||||||
p("Are you sure you want to wipe everything?\nThis includes:\n- Saves\n- Game Data\n- All other data on the system\n\nUse this only as a last resort!")
|
|
||||||
color(0xFFFF00)
|
border = {
|
||||||
tw=10000
|
setpixels(0,0,1279,19,border_color)
|
||||||
wait()
|
setpixels(0,700,1279,719,border_color)
|
||||||
color(0x0000FF)
|
setpixels(0,20,19,699,border_color)
|
||||||
p("Press power to wipe, any other key to exit")a=pause()if(!a.power){exit()}clear()
|
setpixels(1260,20,1279,699,border_color)
|
||||||
|
}
|
||||||
|
|
||||||
|
i = 20
|
||||||
|
x_pos = 10
|
||||||
|
y_pos = 10
|
||||||
|
|
||||||
|
["WARNING!!!",
|
||||||
|
"",
|
||||||
|
"Do you really want to wipe your system?",
|
||||||
|
"This will remove:",
|
||||||
|
"- Your Save Data",
|
||||||
|
"- Your Game Data",
|
||||||
|
"- Your User Data",
|
||||||
|
"- Critical System Calibration Data"
|
||||||
|
"",
|
||||||
|
"This script includes wiping some calibration data.",
|
||||||
|
"Among other uses, this data is used for battery calibration.",
|
||||||
|
"This is especially problematic for lite systems,",
|
||||||
|
" as it makes the system initialize with unsafe",
|
||||||
|
" battery calibration values!",
|
||||||
|
"",
|
||||||
|
"Restoring an emmc backup is always preferable over wiping.",
|
||||||
|
"",
|
||||||
|
"Pull requests to fix the calibration issue are welcome",
|
||||||
|
"https://github.com/suchmememanyskill/TegraExplorer"].foreach("line")
|
||||||
|
{
|
||||||
|
printpos(x_pos, y_pos)
|
||||||
|
y_pos = y_pos + 1
|
||||||
|
print(line)
|
||||||
|
}
|
||||||
|
|
||||||
|
time = 10000
|
||||||
|
y_pos = y_pos + 4
|
||||||
|
|
||||||
|
while (i > 0)
|
||||||
|
{
|
||||||
|
i = i - 1
|
||||||
|
|
||||||
|
if (i % 2 == 0){
|
||||||
|
border_color = 0xFF0000
|
||||||
|
}.else() {
|
||||||
|
border_color = 0x000000
|
||||||
|
}
|
||||||
|
|
||||||
|
border()
|
||||||
|
sleep(500)
|
||||||
|
time = time - 500
|
||||||
|
printpos(x_pos, y_pos)
|
||||||
|
print("Waiting for", time / 1000, "seconds")
|
||||||
|
}
|
||||||
|
|
||||||
|
printpos(x_pos, y_pos)
|
||||||
|
print("Ready to wipe", selected_target, " ")
|
||||||
|
y_pos = y_pos + 1
|
||||||
|
printpos(x_pos, y_pos)
|
||||||
|
print("Press the power button to wipe, any other key to exit")
|
||||||
|
|
||||||
|
result = pause(0x70F000F)
|
||||||
|
|
||||||
|
if (!result.power)
|
||||||
|
{
|
||||||
|
exit()
|
||||||
|
}
|
||||||
|
|
||||||
|
clear()
|
||||||
color(0xFF0000)
|
color(0xFF0000)
|
||||||
pr("Deleting system saves... ")
|
pr("Deleting system saves... ")
|
||||||
f=readdir("bis:/save")
|
f=readdir("bis:/save")
|
||||||
|
|
|
@ -46,6 +46,19 @@ ClassFunction(stdIf) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Takes [int]. Returns empty.
|
||||||
|
ClassFunction(stdSleep)
|
||||||
|
{
|
||||||
|
s64 value = getIntValue(args[0]);
|
||||||
|
|
||||||
|
if (value)
|
||||||
|
{
|
||||||
|
msleep(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
return &emptyClass;
|
||||||
|
}
|
||||||
|
|
||||||
// Takes [function, function]. Returns empty. Works by evaling the first function and running the 2nd if true.
|
// Takes [function, function]. Returns empty. Works by evaling the first function and running the 2nd if true.
|
||||||
ClassFunction(stdWhile) {
|
ClassFunction(stdWhile) {
|
||||||
Variable_t* result = eval(args[0]->function.function.operations.data, args[0]->function.function.operations.count, 1);
|
Variable_t* result = eval(args[0]->function.function.operations.data, args[0]->function.function.operations.count, 1);
|
||||||
|
@ -566,6 +579,7 @@ ClassFunctionTableEntry_t standardFunctionDefenitions[] = {
|
||||||
{"menu", stdMenuFull, 3, menuArgsStd},
|
{"menu", stdMenuFull, 3, menuArgsStd},
|
||||||
{"menu", stdMenuFull, 2, menuArgsStd},
|
{"menu", stdMenuFull, 2, menuArgsStd},
|
||||||
{"power", stdPower, 1, threeIntsStd},
|
{"power", stdPower, 1, threeIntsStd},
|
||||||
|
{"sleep", stdSleep, 1, threeIntsStd},
|
||||||
|
|
||||||
// System
|
// System
|
||||||
{"mountsys", stdMountSysmmc, 1, twoStringArgStd},
|
{"mountsys", stdMountSysmmc, 1, twoStringArgStd},
|
||||||
|
|
Loading…
Reference in a new issue