From d4ad14c2b030795801a4bbf3b8d14a04546c91fa Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Fri, 11 Feb 2005 09:02:46 +0000 Subject: Correct check for BUTTON_RC_ON, reset cookie when Hold swicth is on git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5899 a1c6a512-1295-4272-9138-f99709370657 --- bootloader/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bootloader/main.c') diff --git a/bootloader/main.c b/bootloader/main.c index 8ca44e8c47..0cad6ff208 100644 --- a/bootloader/main.c +++ b/bootloader/main.c @@ -143,7 +143,7 @@ void main(void) sleep(HZ/50); /* Allow the button driver to check the buttons */ if(button_status() & BUTTON_REC || - button_status() & BUTTON_RC_ON) { + (button_status() & BUTTON_RC_ON) == BUTTON_RC_ON) { lcd_puts(0, 8, "Starting original firmware..."); lcd_update(); start_iriver_fw(); @@ -153,6 +153,9 @@ void main(void) lcd_puts(0, 8, "HOLD switch on, power off..."); lcd_update(); sleep(HZ/2); + /* Reset the cookie for the crt0 crash check */ + asm(" move.l #0,%d0"); + asm(" move.l %d0,0x10017ffc"); power_off(); } #if 0 -- cgit v1.2.3