diff options
author | Thomas Martitz <kugel@rockbox.org> | 2009-09-23 17:26:42 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2009-09-23 17:26:42 +0000 |
commit | d5797a6e93e11eb689e9e16c55a377dc2555b467 (patch) | |
tree | 8e1816f3d9562257cedf4a56e98e37afb9df6114 /uisimulator/sdl | |
parent | ca85c401f58e089b27a4d37ce76265985fa470d7 (diff) |
Fix non-hold button and headphone detection target sims.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22800 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/sdl')
-rw-r--r-- | uisimulator/sdl/button-sdl.h | 1 | ||||
-rw-r--r-- | uisimulator/sdl/button.c | 8 |
2 files changed, 7 insertions, 2 deletions
diff --git a/uisimulator/sdl/button-sdl.h b/uisimulator/sdl/button-sdl.h index 0adb434e6a..5a0a7e2620 100644 --- a/uisimulator/sdl/button-sdl.h +++ b/uisimulator/sdl/button-sdl.h @@ -27,7 +27,6 @@ #include "config.h" #include "button-target.h" -#define HAS_BUTTON_HOLD #undef HAVE_LCD_FLIP #undef button_init_device diff --git a/uisimulator/sdl/button.c b/uisimulator/sdl/button.c index c52cf12f9c..5bda8a3ffd 100644 --- a/uisimulator/sdl/button.c +++ b/uisimulator/sdl/button.c @@ -1216,17 +1216,23 @@ int button_read_device(int* data) int button_read_device(void) { #endif - static int hold_button_old = false; + +#ifdef HAS_BUTTON_HOLD int hold_button = button_hold(); + +#ifdef HAVE_BACKLIGHT /* light handling */ + static int hold_button_old = false; if (hold_button != hold_button_old) { hold_button_old = hold_button; backlight_hold_changed(hold_button); } +#endif if (hold_button) return BUTTON_NONE; +#endif return btn; } |