summaryrefslogtreecommitdiff
path: root/bootloader/iriver_h300.c
diff options
context:
space:
mode:
Diffstat (limited to 'bootloader/iriver_h300.c')
-rw-r--r--bootloader/iriver_h300.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/bootloader/iriver_h300.c b/bootloader/iriver_h300.c
index 6cacbc4a42..2e4909fd53 100644
--- a/bootloader/iriver_h300.c
+++ b/bootloader/iriver_h300.c
@@ -425,6 +425,22 @@ void main(void)
425 425
426 adc_init(); 426 adc_init();
427 button_init(); 427 button_init();
428 sleep(HZ/50); /* Allow the button driver to check the buttons */
429
430 /* Only check remote hold status if remote power button was actually used. */
431 if (rc_on_button)
432 {
433 lcd_remote_init();
434
435 if (remote_button_hold())
436 hold_status = true;
437 }
438
439 /* Check main hold switch status too. */
440 if (on_button && button_hold())
441 {
442 hold_status = true;
443 }
428 444
429 /* Power on the hard drive early, to speed up the loading. */ 445 /* Power on the hard drive early, to speed up the loading. */
430 if (!hold_status && !recovery_mode) 446 if (!hold_status && !recovery_mode)
@@ -436,7 +452,10 @@ void main(void)
436 } 452 }
437 453
438 lcd_init(); 454 lcd_init();
439 lcd_remote_init(); 455
456 if (!rc_on_button)
457 lcd_remote_init();
458
440 font_init(); 459 font_init();
441 460
442 lcd_setfont(FONT_SYSFIXED); 461 lcd_setfont(FONT_SYSFIXED);
@@ -446,7 +465,6 @@ void main(void)
446 printf("Rockbox boot loader"); 465 printf("Rockbox boot loader");
447 printf("Version %s", rbversion); 466 printf("Version %s", rbversion);
448 467
449 sleep(HZ/50); /* Allow the button driver to check the buttons */
450 rec_button = ((button_status() & BUTTON_REC) == BUTTON_REC) 468 rec_button = ((button_status() & BUTTON_REC) == BUTTON_REC)
451 || ((button_status() & BUTTON_RC_REC) == BUTTON_RC_REC); 469 || ((button_status() & BUTTON_RC_REC) == BUTTON_RC_REC);
452 470
@@ -457,11 +475,6 @@ void main(void)
457 475
458 /* Don't start if the Hold button is active on the device you 476 /* Don't start if the Hold button is active on the device you
459 are starting with */ 477 are starting with */
460 if ((on_button && button_hold()) ||
461 (rc_on_button && remote_button_hold()))
462 {
463 hold_status = true;
464 }
465 if ((hold_status || recovery_mode) && !rtc_alarm && 478 if ((hold_status || recovery_mode) && !rtc_alarm &&
466 (usb_detect() != USB_INSERTED) && !charger_inserted()) 479 (usb_detect() != USB_INSERTED) && !charger_inserted())
467 { 480 {