aboutsummaryrefslogtreecommitdiff
path: root/backends/events/openpandora
diff options
context:
space:
mode:
authorDavid-John Willis2011-10-10 21:18:07 +0100
committerDavid-John Willis2011-10-10 21:18:07 +0100
commita27c2b401c1027b94e0f793ca4067be2b0af2066 (patch)
tree4331fe1d5c10d2701ad53855d7db4be1ac046f56 /backends/events/openpandora
parenta4cc70c5e138755f597e7432bafa95d64a91d1eb (diff)
downloadscummvm-rg350-a27c2b401c1027b94e0f793ca4067be2b0af2066.tar.gz
scummvm-rg350-a27c2b401c1027b94e0f793ca4067be2b0af2066.tar.bz2
scummvm-rg350-a27c2b401c1027b94e0f793ca4067be2b0af2066.zip
OPENPANDORA: Cleanup the format of code a little to match our Code Formatting Conventions.
* No functional changes. * Automated astyle pass.
Diffstat (limited to 'backends/events/openpandora')
-rw-r--r--backends/events/openpandora/op-events.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/backends/events/openpandora/op-events.cpp b/backends/events/openpandora/op-events.cpp
index 56915f96fe..c1d6362fcb 100644
--- a/backends/events/openpandora/op-events.cpp
+++ b/backends/events/openpandora/op-events.cpp
@@ -38,23 +38,23 @@
#include "common/events.h"
/* Quick default button states for modifiers. */
-int BUTTON_STATE_L = false;
+int BUTTON_STATE_L = false;
enum {
/* Touchscreen TapMode */
- TAPMODE_LEFT = 0,
- TAPMODE_RIGHT = 1,
- TAPMODE_HOVER = 2
+ TAPMODE_LEFT = 0,
+ TAPMODE_RIGHT = 1,
+ TAPMODE_HOVER = 2
};
OPEventSource::OPEventSource()
- : _buttonStateL(false){
+ : _buttonStateL(false) {
}
/* Custom handleMouseButtonDown/handleMouseButtonUp to deal with 'Tap Mode' for the touchscreen */
bool OPEventSource::handleMouseButtonDown(SDL_Event &ev, Common::Event &event) {
- if (ev.button.button == SDL_BUTTON_LEFT){
+ if (ev.button.button == SDL_BUTTON_LEFT) {
if (BUTTON_STATE_L == true) /* BUTTON_STATE_L = Left Trigger Held, force Right Click */
event.type = Common::EVENT_RBUTTONDOWN;
else if (OP::tapmodeLevel == TAPMODE_LEFT) /* TAPMODE_LEFT = Left Click Tap Mode */
@@ -65,8 +65,7 @@ bool OPEventSource::handleMouseButtonDown(SDL_Event &ev, Common::Event &event) {
event.type = Common::EVENT_MOUSEMOVE;
else
event.type = Common::EVENT_LBUTTONDOWN; /* For normal mice etc. */
- }
- else if (ev.button.button == SDL_BUTTON_RIGHT)
+ } else if (ev.button.button == SDL_BUTTON_RIGHT)
event.type = Common::EVENT_RBUTTONDOWN;
#if defined(SDL_BUTTON_WHEELUP) && defined(SDL_BUTTON_WHEELDOWN)
else if (ev.button.button == SDL_BUTTON_WHEELUP)
@@ -87,7 +86,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 (ev.button.button == SDL_BUTTON_LEFT) {
if (BUTTON_STATE_L == true) /* BUTTON_STATE_L = Left Trigger Held, force Right Click */
event.type = Common::EVENT_RBUTTONUP;
else if (OP::tapmodeLevel == TAPMODE_LEFT) /* TAPMODE_LEFT = Left Click Tap Mode */
@@ -98,8 +97,7 @@ bool OPEventSource::handleMouseButtonUp(SDL_Event &ev, Common::Event &event) {
event.type = Common::EVENT_MOUSEMOVE;
else
event.type = Common::EVENT_LBUTTONUP; /* For normal mice etc. */
- }
- else if (ev.button.button == SDL_BUTTON_RIGHT)
+ } else if (ev.button.button == SDL_BUTTON_RIGHT)
event.type = Common::EVENT_RBUTTONUP;
#if defined(SDL_BUTTON_MIDDLE)
else if (ev.button.button == SDL_BUTTON_MIDDLE)