Skip to content

Commit 9a70112

Browse files
committed
Small bug fix.
Exception handler now automatically returns to the HBC after timeout + Added a message that tells the user that they can press reset (or Z on their GameCube Controller) to skip timeout because users tended to just unplug their Wiis from power.
1 parent 4d3d1a3 commit 9a70112

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

libogc/exception.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ typedef struct _framerec {
6161
} frame_rec, *frame_rec_t;
6262

6363
static void *exception_xfb = (void*)0xC1700000; //we use a static address above ArenaHi.
64-
static int reload_timer = -1;
64+
static int reload_timer = 1000;
6565

6666
void __exception_sethandler(u32 nExcept, void (*pHndl)(frame_context*));
6767

@@ -201,22 +201,26 @@ void __exception_setreload(int t)
201201
static void waitForReload(void)
202202
{
203203
u32 level;
204-
204+
205205
PAD_Init();
206206

207-
if(reload_timer > 0)
208-
kprintf("\n\tReloading in %d seconds\n", reload_timer/50);
207+
if(reload_timer > 0) {
208+
kprintf("\n\n\tPress RESET (or Z on your GameCube Controller) to skip\n\n\tReloading in %d seconds", reload_timer/50);
209+
}
209210

210211
while ( 1 )
211212
{
213+
if(reload_timer > 0) {
214+
kprintf("\r\tReloading in %d seconds ", reload_timer/50);
215+
}
212216
PAD_ScanPads();
213217

214218
int buttonsDown = PAD_ButtonsDown(0);
215219

216220
if( (buttonsDown & PAD_TRIGGER_Z) || SYS_ResetButtonDown() ||
217221
reload_timer == 0 )
218222
{
219-
kprintf("\n\tReload\n\n\n");
223+
kprintf("\n\n\tReload\n\n\n");
220224
_CPU_ISR_Disable(level);
221225
__reload ();
222226
}

0 commit comments

Comments
 (0)