diff options
| -rw-r--r-- | firmware/drivers/button.c | 2 | ||||
| -rw-r--r-- | firmware/target/hosted/sdl/button-sdl.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c index 1cc9542..718fb6a 100644 --- a/firmware/drivers/button.c +++ b/firmware/drivers/button.c @@ -87,13 +87,13 @@ static bool phones_present = false; #ifdef HAVE_BUTTON_DATA static int button_read(int *data); +static int lastdata = 0; #else static int button_read(void); #endif #ifdef HAVE_TOUCHSCREEN static int last_touchscreen_touch; -static int lastdata = 0; #endif #if defined(HAVE_HEADPHONE_DETECTION) static struct timeout hp_detect_timeout; /* Debouncer for headphone plug/unplug */ diff --git a/firmware/target/hosted/sdl/button-sdl.c b/firmware/target/hosted/sdl/button-sdl.c index 9677f1d..2a3202b 100644 --- a/firmware/target/hosted/sdl/button-sdl.c +++ b/firmware/target/hosted/sdl/button-sdl.c @@ -444,11 +444,15 @@ static void button_event(int key, bool pressed) else btn &= ~new_btn; } -#if defined(HAVE_BUTTON_DATA) && defined(HAVE_TOUCHSCREEN) +#if defined(HAVE_BUTTON_DATA) int button_read_device(int* data) { +#if defined(HAVE_TOUCHSCREEN) *data = mouse_coords; #else + (void) *data; /* suppress compiler warnings */ +#endif +#else int button_read_device(void) { #endif |