1
0
Fork 0
mirror of https://github.com/suchmememanyskill/TegraExplorer.git synced 2024-11-08 13:11:54 +00:00

add power()

This commit is contained in:
suchmememanyskill 2021-07-28 00:31:36 +02:00
parent 192568b686
commit 74b6106f26

View file

@ -456,6 +456,11 @@ ClassFunction(stdGetCwd){
return newStringVariablePtr(CpyStr(TConf.scriptCWD), 0, 1);
}
ClassFunction(stdPower){
power_set_state(MIN(0, (getIntValue(args[0]) % POWER_OFF_REBOOT)));
return &emptyClass;
}
#else
#define STUBBED(name) ClassFunction(name) { return newIntVariablePtr(0); }
@ -540,6 +545,7 @@ ClassFunctionTableEntry_t standardFunctionDefenitions[] = {
{"color", stdColor, 1, threeIntsStd},
{"menu", stdMenuFull, 3, menuArgsStd},
{"menu", stdMenuFull, 2, menuArgsStd},
{"power", stdPower, 1, threeIntsStd},
// System
{"mountsys", stdMountSysmmc, 1, twoStringArgStd},