Skip to content

Commit

Permalink
touchInput: remove ignoreNextFinger decrement from ClearFirstTouch
Browse files Browse the repository at this point in the history
  • Loading branch information
bradallred committed May 24, 2013
1 parent d602aa9 commit f06ff28
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gemrb/plugins/SDLVideo/SDL20Video.cpp
Expand Up @@ -43,7 +43,7 @@ SDL20VideoDriver::SDL20VideoDriver(void)
screenTexture = NULL;

// touch input
ignoreNextFingerUp = 1;
ignoreNextFingerUp = 0;
ClearFirstTouch();
}

Expand Down Expand Up @@ -373,7 +373,6 @@ void SDL20VideoDriver::ClearFirstTouch()
{
firstFingerDown = SDL_TouchFingerEvent();
firstFingerDown.fingerId = -1;
ignoreNextFingerUp--;
firstFingerDownTime = 0;
}

Expand All @@ -392,6 +391,7 @@ bool SDL20VideoDriver::ProcessFirstTouch( int mouseButton )
mouseButton, GetModState(SDL_GetModState()) );

ClearFirstTouch();
ignoreNextFingerUp--;
return true;
}
return false;
Expand Down Expand Up @@ -513,7 +513,7 @@ int SDL20VideoDriver::ProcessEvent(const SDL_Event & event)
if (numFingers == 0) { // this event was the last finger that was in contact
ProcessFirstTouch(mouseButton);
if (ignoreNextFingerUp <= 0) {
ignoreNextFingerUp = 1;
ignoreNextFingerUp = 1; // set to one because we decrement unconditionally later
if (CursorIndex != VID_CUR_DRAG)
CursorIndex = VID_CUR_UP;
// move cursor to ensure any referencing of the cursor is accurate
Expand Down Expand Up @@ -593,6 +593,7 @@ int SDL20VideoDriver::ProcessEvent(const SDL_Event & event)
restoring from "minimized state" should be a clean slate.
*/
ClearFirstTouch();
ignoreNextFingerUp = 0;
GameControl* gc = core->GetGameControl();
if (gc) {
gc->ClearMouseState();
Expand Down

0 comments on commit f06ff28

Please sign in to comment.