Skip to content

Commit

Permalink
Reset swipe finger on finger lift
Browse files Browse the repository at this point in the history
  • Loading branch information
NyakoFox committed Aug 20, 2024
1 parent 9277b20 commit 8cbfdf2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions desktop_version/src/KeyPoll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,11 @@ void KeyPoll::Poll(void)
}
}

if (evt.tfinger.fingerId == touch::swipe_finger)
{
touch::swipe_finger = -1;
}

raw_mousex = evt.tfinger.x * screen_width;
raw_mousey = evt.tfinger.y * screen_height;
leftbutton = 0;
Expand Down
1 change: 1 addition & 0 deletions desktop_version/src/Touch.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ namespace touch
extern bool scroll;
extern TouchControlStyle style;
extern int swipe_delta;
extern SDL_FingerID swipe_finger;

void refresh_buttons(void);
void update_sliders();
Expand Down

0 comments on commit 8cbfdf2

Please sign in to comment.