Fix 7760: Touchscreen presses are handled twice (#8056)

This commit is contained in:
youngspe 2018-10-06 09:43:39 -06:00 committed by Hielke Morsink
parent f468bef6cc
commit c543c1078d
1 changed files with 8 additions and 0 deletions

View File

@ -379,6 +379,10 @@ public:
break;
case SDL_MOUSEBUTTONDOWN:
{
if (e.button.which == SDL_TOUCH_MOUSEID)
{
break;
}
int32_t x = (int32_t)(e.button.x / gConfigGeneral.window_scale);
int32_t y = (int32_t)(e.button.y / gConfigGeneral.window_scale);
switch (e.button.button)
@ -401,6 +405,10 @@ public:
}
case SDL_MOUSEBUTTONUP:
{
if (e.button.which == SDL_TOUCH_MOUSEID)
{
break;
}
int32_t x = (int32_t)(e.button.x / gConfigGeneral.window_scale);
int32_t y = (int32_t)(e.button.y / gConfigGeneral.window_scale);
switch (e.button.button)