mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 13:15:18 -05:00
i7: Notify the backlight driver when the HOLD button is toggled, same as D2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22607 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
8f76e7ff8f
commit
9131b16938
1 changed files with 12 additions and 0 deletions
|
|
@ -21,6 +21,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
#include "button.h"
|
#include "button.h"
|
||||||
|
#include "backlight.h"
|
||||||
#include "adc.h"
|
#include "adc.h"
|
||||||
|
|
||||||
#include "button-target.h"
|
#include "button-target.h"
|
||||||
|
|
@ -42,10 +43,21 @@ void button_init_device(void)
|
||||||
|
|
||||||
int button_read_device(void)
|
int button_read_device(void)
|
||||||
{
|
{
|
||||||
|
static bool hold_button = false;
|
||||||
|
bool hold_button_old;
|
||||||
|
|
||||||
int btn = BUTTON_NONE;
|
int btn = BUTTON_NONE;
|
||||||
int adc;
|
int adc;
|
||||||
int sensor;
|
int sensor;
|
||||||
|
|
||||||
|
hold_button_old = hold_button;
|
||||||
|
hold_button = button_hold();
|
||||||
|
|
||||||
|
#ifndef BOOTLOADER
|
||||||
|
if (hold_button != hold_button_old)
|
||||||
|
backlight_hold_changed(hold_button);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (button_hold())
|
if (button_hold())
|
||||||
return BUTTON_NONE;
|
return BUTTON_NONE;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue