mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-10 21:55:10 -05:00
D2: Notify the backlight driver when the HOLD button is toggled. Fixes FS#10451.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22007 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
9f828fd522
commit
07a6aac401
1 changed files with 15 additions and 2 deletions
|
|
@ -103,9 +103,22 @@ int button_read_device(int *data)
|
||||||
{
|
{
|
||||||
int btn = BUTTON_NONE;
|
int btn = BUTTON_NONE;
|
||||||
int adc;
|
int adc;
|
||||||
*data = 0;
|
|
||||||
|
static bool hold_button = false;
|
||||||
|
bool hold_button_old;
|
||||||
|
|
||||||
if (button_hold()) return BUTTON_NONE;
|
*data = 0;
|
||||||
|
|
||||||
|
hold_button_old = hold_button;
|
||||||
|
hold_button = button_hold();
|
||||||
|
|
||||||
|
#ifndef BOOTLOADER
|
||||||
|
if (hold_button != hold_button_old)
|
||||||
|
backlight_hold_changed(hold_button);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (hold_button)
|
||||||
|
return BUTTON_NONE;
|
||||||
|
|
||||||
if (GPIOB & 0x4)
|
if (GPIOB & 0x4)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue