Fix power off
This commit is contained in:
parent
b893d0181a
commit
1474b2d6c6
10
app/main.c
10
app/main.c
|
@ -266,6 +266,8 @@ void main() {
|
|||
restore_act();
|
||||
}
|
||||
|
||||
//Read Exp Date
|
||||
|
||||
printf("Finding expiration start date...");
|
||||
|
||||
unsigned char startDate[0x4];
|
||||
|
@ -279,11 +281,11 @@ void main() {
|
|||
sceIoRead(fd,&startDate,0x04);
|
||||
sceIoClose(fd);
|
||||
|
||||
|
||||
printf(" found: 0x%02X%02X%02X%02X\n",startDate[0],startDate[1],startDate[2],startDate[3]);
|
||||
|
||||
backup_act();
|
||||
|
||||
if(vshSblAimgrIsTool())
|
||||
if(vshSblAimgrIsTool()) //devkit
|
||||
{
|
||||
unsigned int timestamp = *((unsigned int*)&startDate);
|
||||
printf("Updating CPRTC to %x\n",timestamp);
|
||||
|
@ -291,7 +293,7 @@ void main() {
|
|||
sceRegMgrSetKeyInt("/CONFIG/DATE", "set_automatically", 0);
|
||||
printf("has ret 0x%x\n",ret);
|
||||
}
|
||||
else if(vshSblAimgrIsDEX())
|
||||
else if(vshSblAimgrIsDEX()) //testkit
|
||||
{
|
||||
printf("Calculating PSTime: ");
|
||||
unsigned int _startDate = *((unsigned int*)&startDate);
|
||||
|
@ -337,7 +339,7 @@ void main() {
|
|||
printf("Deactivate by holding START + SELECT + PS + POWER\n\n");
|
||||
printf("Press any key to turn off console");
|
||||
get_key();
|
||||
scePowerRequestSuspend();
|
||||
scePowerRequestStandby();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue