mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-09-30 06:31:41 +00:00
ignore the extra event on touchpad
This commit is contained in:
@@ -1281,6 +1281,12 @@ EX void handle_event(SDL_Event& ev) {
|
|||||||
bool rollchange = (cmode & sm::OVERVIEW) && getcstat >= 2000 && cheater;
|
bool rollchange = (cmode & sm::OVERVIEW) && getcstat >= 2000 && cheater;
|
||||||
|
|
||||||
if(ev.type == SDL_EVENT_MOUSE_BUTTON_DOWN || ev.type == SDL_EVENT_MOUSE_BUTTON_UP SDL12(, || ev.type == SDL_EVENT_MOUSE_WHEEL)) {
|
if(ev.type == SDL_EVENT_MOUSE_BUTTON_DOWN || ev.type == SDL_EVENT_MOUSE_BUTTON_UP SDL12(, || ev.type == SDL_EVENT_MOUSE_WHEEL)) {
|
||||||
|
|
||||||
|
#if SDLVER == 1
|
||||||
|
// ignore the extra event on touchpad
|
||||||
|
if(ev.type == SDL_EVENT_MOUSE_BUTTON_DOWN && ev.button.which == 255) return;
|
||||||
|
#endif
|
||||||
|
|
||||||
mousepressed = ev.type == SDL_EVENT_MOUSE_BUTTON_DOWN;
|
mousepressed = ev.type == SDL_EVENT_MOUSE_BUTTON_DOWN;
|
||||||
if(mousepressed) flashMessages();
|
if(mousepressed) flashMessages();
|
||||||
mousing = true;
|
mousing = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user