From a27c2b401c1027b94e0f793ca4067be2b0af2066 Mon Sep 17 00:00:00 2001 From: David-John Willis Date: Mon, 10 Oct 2011 21:18:07 +0100 Subject: OPENPANDORA: Cleanup the format of code a little to match our Code Formatting Conventions. * No functional changes. * Automated astyle pass. --- backends/events/openpandora/op-events.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'backends/events/openpandora/op-events.cpp') 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) -- cgit v1.2.3