From 54e6cf4cda16cfbb4ea5e3b728188fb837468279 Mon Sep 17 00:00:00 2001 From: Cameron Cawley Date: Sun, 3 Nov 2019 22:28:24 +0000 Subject: GPH/OPENPANDORA: Remove global variable BUTTON_STATE_L --- backends/events/openpandora/op-events.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'backends/events/openpandora') diff --git a/backends/events/openpandora/op-events.cpp b/backends/events/openpandora/op-events.cpp index 80fff20bc2..fd5d2bc043 100644 --- a/backends/events/openpandora/op-events.cpp +++ b/backends/events/openpandora/op-events.cpp @@ -37,9 +37,6 @@ #include "common/util.h" #include "common/events.h" -/* Quick default button states for modifiers. */ -int BUTTON_STATE_L = false; - enum { /* Touchscreen TapMode */ TAPMODE_LEFT = 0, @@ -56,7 +53,7 @@ OPEventSource::OPEventSource() bool OPEventSource::handleMouseButtonDown(SDL_Event &ev, Common::Event &event) { if (ev.button.button == SDL_BUTTON_LEFT) { - if (BUTTON_STATE_L == true) /* BUTTON_STATE_L = Left Trigger Held, force Right Click */ + if (_buttonStateL == true) /* _buttonStateL = Left Trigger Held, force Right Click */ event.type = Common::EVENT_RBUTTONDOWN; else if (OP::tapmodeLevel == TAPMODE_LEFT) /* TAPMODE_LEFT = Left Click Tap Mode */ event.type = Common::EVENT_LBUTTONDOWN; @@ -93,7 +90,7 @@ bool OPEventSource::handleMouseButtonDown(SDL_Event &ev, Common::Event &event) { bool OPEventSource::handleMouseButtonUp(SDL_Event &ev, Common::Event &event) { if (ev.button.button == SDL_BUTTON_LEFT) { - if (BUTTON_STATE_L == true) /* BUTTON_STATE_L = Left Trigger Held, force Right Click */ + if (_buttonStateL == true) /* _buttonStateL = Left Trigger Held, force Right Click */ event.type = Common::EVENT_RBUTTONUP; else if (OP::tapmodeLevel == TAPMODE_LEFT) /* TAPMODE_LEFT = Left Click Tap Mode */ event.type = Common::EVENT_LBUTTONUP; @@ -181,7 +178,7 @@ bool OPEventSource::remapKey(SDL_Event &ev, Common::Event &event) { } break; case SDLK_RSHIFT: - BUTTON_STATE_L = true; + _buttonStateL = true; break; case SDLK_RCTRL: break; @@ -209,7 +206,7 @@ bool OPEventSource::remapKey(SDL_Event &ev, Common::Event &event) { case SDLK_PAGEUP: break; case SDLK_RSHIFT: - BUTTON_STATE_L = false; + _buttonStateL = false; break; case SDLK_RCTRL: break; -- cgit v1.2.3