diff options
Diffstat (limited to 'uisimulator/sdl/button.c')
-rw-r--r-- | uisimulator/sdl/button.c | 8 |
1 files changed, 7 insertions, 1 deletions
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; } |