diff options
author | Marcoen Hirschberg <marcoen@gmail.com> | 2007-01-17 20:24:06 +0000 |
---|---|---|
committer | Marcoen Hirschberg <marcoen@gmail.com> | 2007-01-17 20:24:06 +0000 |
commit | c45ae3edf2764274833b97bb1fac3d372f2c1c60 (patch) | |
tree | d1474efd141799e3cb0000887299a70d34838f61 | |
parent | 1ab8f327800343b6701561483d1b39ad481ac06c (diff) | |
download | rockbox-c45ae3edf2764274833b97bb1fac3d372f2c1c60.tar.gz rockbox-c45ae3edf2764274833b97bb1fac3d372f2c1c60.zip |
fix backlight on hold key setting
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12055 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/target/arm/gigabeat/meg-fx/button-meg-fx.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/firmware/target/arm/gigabeat/meg-fx/button-meg-fx.c b/firmware/target/arm/gigabeat/meg-fx/button-meg-fx.c index 117e1114af..71d45c385c 100644 --- a/firmware/target/arm/gigabeat/meg-fx/button-meg-fx.c +++ b/firmware/target/arm/gigabeat/meg-fx/button-meg-fx.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include "backlight-target.h" | 29 | #include "backlight-target.h" |
30 | 30 | ||
31 | static bool headphones_detect; | 31 | static bool headphones_detect; |
32 | static bool hold_button = false; | ||
32 | 33 | ||
33 | static int const remote_buttons[] = | 34 | static int const remote_buttons[] = |
34 | { | 35 | { |
@@ -68,6 +69,17 @@ int button_read_device(void) | |||
68 | static int lastbutton; | 69 | static int lastbutton; |
69 | unsigned short remote_adc; | 70 | unsigned short remote_adc; |
70 | int btn = BUTTON_NONE; | 71 | int btn = BUTTON_NONE; |
72 | bool hold_button_old; | ||
73 | |||
74 | /* normal buttons */ | ||
75 | hold_button_old = hold_button; | ||
76 | hold_button = button_hold(); | ||
77 | |||
78 | #ifndef BOOTLOADER | ||
79 | /* give BL notice if HB state chaged */ | ||
80 | if (hold_button != hold_button_old) | ||
81 | backlight_hold_changed(hold_button); | ||
82 | #endif | ||
71 | 83 | ||
72 | /* See header for ADC values when remote control buttons are pressed */ | 84 | /* See header for ADC values when remote control buttons are pressed */ |
73 | /* Only one button can be sensed at a time on the remote. */ | 85 | /* Only one button can be sensed at a time on the remote. */ |
@@ -82,7 +94,7 @@ int button_read_device(void) | |||
82 | } | 94 | } |
83 | 95 | ||
84 | /* Check for hold first - exit if asserted with no button pressed */ | 96 | /* Check for hold first - exit if asserted with no button pressed */ |
85 | if (button_hold()) | 97 | if (hold_button) |
86 | return btn; | 98 | return btn; |
87 | 99 | ||
88 | /* the side buttons - Check before doing all of the work on each bit */ | 100 | /* the side buttons - Check before doing all of the work on each bit */ |