diff --git a/source/arm11/hid.c b/source/arm11/hid.c index 93b2097..1e14da9 100644 --- a/source/arm11/hid.c +++ b/source/arm11/hid.c @@ -34,8 +34,8 @@ homeShellState |= (state & 4)<<19; homeShellState |= (state & 0x20)<<17; - homeShellState ^= (state & 8)<<18; - homeShellState ^= (state & 0x40)<<16; + if(homeShellState & 1u<<21) homeShellState ^= (state & 8)<<18; + if(homeShellState & 1u<<22) homeShellState ^= (state & 0x40)<<16; } u32 hidGetPowerButton(void) diff --git a/source/arm9/timer.c b/source/arm9/timer.c index acac072..01aa33c 100644 --- a/source/arm9/timer.c +++ b/source/arm9/timer.c @@ -26,11 +26,7 @@ -static void timerSleepHandler(UNUSED u32 id) -{ - overflows--; - if(!overflows) REG_TIMER3_CNT = 0; -} +static void timerSleepHandler(UNUSED u32 id); void TIMER_init(void) { @@ -65,3 +61,9 @@ waitForIrq(); } } + +static void timerSleepHandler(UNUSED u32 id) +{ + overflows--; + if(!overflows) REG_TIMER3_CNT = 0; +}