EventThread: Discard fake mouse events on mobile

This commit is contained in:
Jonas Kulla 2014-12-24 09:39:01 +01:00
parent 7cbf81c83a
commit 9122446b23
1 changed files with 9 additions and 0 deletions

View File

@ -300,14 +300,23 @@ void EventThread::process(RGSSThreadData &rtData)
break;
case SDL_MOUSEBUTTONDOWN :
if (event.button.which == SDL_TOUCH_MOUSEID)
break;
mouseState.buttons[event.button.button] = true;
break;
case SDL_MOUSEBUTTONUP :
if (event.button.which == SDL_TOUCH_MOUSEID)
break;
mouseState.buttons[event.button.button] = false;
break;
case SDL_MOUSEMOTION :
if (event.button.which == SDL_TOUCH_MOUSEID)
break;
mouseState.x = event.motion.x;
mouseState.y = event.motion.y;