summaryrefslogtreecommitdiff
path: root/uisimulator/sdl
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/sdl')
-rw-r--r--uisimulator/sdl/button.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/uisimulator/sdl/button.c b/uisimulator/sdl/button.c
index e9fa03cbef..9c8f334b43 100644
--- a/uisimulator/sdl/button.c
+++ b/uisimulator/sdl/button.c
@@ -36,6 +36,7 @@ static intptr_t button_data; /* data value from last message dequeued */
36#ifdef HAVE_TOUCHSCREEN 36#ifdef HAVE_TOUCHSCREEN
37#include "touchscreen.h" 37#include "touchscreen.h"
38static int mouse_coords = 0; 38static int mouse_coords = 0;
39static int last_touchscreen_touch = 0xffff;
39#endif 40#endif
40/* how long until repeat kicks in */ 41/* how long until repeat kicks in */
41#define REPEAT_START 6 42#define REPEAT_START 6
@@ -1310,11 +1311,16 @@ void mouse_tick_task(void)
1310 } 1311 }
1311 1312
1312 mouse_coords = (x<<16)|y; 1313 mouse_coords = (x<<16)|y;
1314 last_touchscreen_touch = current_tick;
1313 button_event(BUTTON_TOUCHSCREEN, true); 1315 button_event(BUTTON_TOUCHSCREEN, true);
1314 if (debug_wps) 1316 if (debug_wps)
1315 printf("Mouse at: (%d, %d)\n", x, y); 1317 printf("Mouse at: (%d, %d)\n", x, y);
1316 } 1318 }
1317} 1319}
1320int touchscreen_last_touch(void)
1321{
1322 return last_touchscreen_touch;
1323}
1318#endif 1324#endif
1319void button_init(void) 1325void button_init(void)
1320{ 1326{