-if wii gets turned off do a full shutdown and ignore standby

This commit is contained in:
fix94.1 2012-09-08 16:55:04 +00:00
parent bc10c19dca
commit 13e2493b19
2 changed files with 17 additions and 4 deletions

View File

@ -64,12 +64,24 @@ bool Sys_Exiting(void)
return reset || shutdown || exiting; return reset || shutdown || exiting;
} }
void Sys_Shutdown(void)
{
/* via hollywood registers first */
*HW_GPIO_OUT |= (1<<1);
/* If it failed just do the libogc way */
SYS_ResetSystem(SYS_SHUTDOWN, 0, 0);
}
void Sys_Test(void) void Sys_Test(void)
{ {
if(reset || shutdown) Close_Inputs(); if(reset || shutdown)
{
if (reset) SYS_ResetSystem(SYS_RESTART, 0, 0); Close_Inputs();
else if (shutdown) SYS_ResetSystem(SYS_POWEROFF, 0, 0); if(reset)
SYS_ResetSystem(SYS_RESTART, 0, 0);
else
Sys_Shutdown();
}
} }
int Sys_GetExitTo(void) int Sys_GetExitTo(void)

View File

@ -32,6 +32,7 @@ extern "C"
#define Priiloader_CFG1 ((vu32*)0x8132FFFB) #define Priiloader_CFG1 ((vu32*)0x8132FFFB)
#define Priiloader_CFG2 ((vu32*)0x817FEFF0) #define Priiloader_CFG2 ((vu32*)0x817FEFF0)
#define HW_GPIO_OUT ((vu32*)0xCD8000E0)
#define HW_AHBPROT ((vu32*)0xCD800064) #define HW_AHBPROT ((vu32*)0xCD800064)
#define MEM_PROT ((vu32)0xCD8B420A) #define MEM_PROT ((vu32)0xCD8B420A)