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 1cc95428ab..718fb6a6da 100644 --- a/firmware/drivers/button.c +++ b/firmware/drivers/button.c | |||
@@ -87,13 +87,13 @@ static bool phones_present = false; | |||
87 | 87 | ||
88 | #ifdef HAVE_BUTTON_DATA | 88 | #ifdef HAVE_BUTTON_DATA |
89 | static int button_read(int *data); | 89 | static int button_read(int *data); |
90 | static int lastdata = 0; | ||
90 | #else | 91 | #else |
91 | static int button_read(void); | 92 | static int button_read(void); |
92 | #endif | 93 | #endif |
93 | 94 | ||
94 | #ifdef HAVE_TOUCHSCREEN | 95 | #ifdef HAVE_TOUCHSCREEN |
95 | static int last_touchscreen_touch; | 96 | static int last_touchscreen_touch; |
96 | static int lastdata = 0; | ||
97 | #endif | 97 | #endif |
98 | #if defined(HAVE_HEADPHONE_DETECTION) | 98 | #if defined(HAVE_HEADPHONE_DETECTION) |
99 | static struct timeout hp_detect_timeout; /* Debouncer for headphone plug/unplug */ | 99 | 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 9677f1dd23..2a3202b6bc 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) | |||
444 | else | 444 | else |
445 | btn &= ~new_btn; | 445 | btn &= ~new_btn; |
446 | } | 446 | } |
447 | #if defined(HAVE_BUTTON_DATA) && defined(HAVE_TOUCHSCREEN) | 447 | #if defined(HAVE_BUTTON_DATA) |
448 | int button_read_device(int* data) | 448 | int button_read_device(int* data) |
449 | { | 449 | { |
450 | #if defined(HAVE_TOUCHSCREEN) | ||
450 | *data = mouse_coords; | 451 | *data = mouse_coords; |
451 | #else | 452 | #else |
453 | (void) *data; /* suppress compiler warnings */ | ||
454 | #endif | ||
455 | #else | ||
452 | int button_read_device(void) | 456 | int button_read_device(void) |
453 | { | 457 | { |
454 | #endif | 458 | #endif |