aboutsummaryrefslogtreecommitdiff
path: root/backends/events/sdl
diff options
context:
space:
mode:
Diffstat (limited to 'backends/events/sdl')
-rw-r--r--backends/events/sdl/sdl-events.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/backends/events/sdl/sdl-events.cpp b/backends/events/sdl/sdl-events.cpp
index 1e5119dbec..038f61664f 100644
--- a/backends/events/sdl/sdl-events.cpp
+++ b/backends/events/sdl/sdl-events.cpp
@@ -737,16 +737,16 @@ bool SdlEventSource::handleJoyButtonUp(SDL_Event &ev, Common::Event &event) {
bool SdlEventSource::handleJoyAxisMotion(SDL_Event &ev, Common::Event &event) {
int axis = ev.jaxis.value;
- if ( axis > JOY_DEADZONE) {
+ if (axis > JOY_DEADZONE) {
axis -= JOY_DEADZONE;
event.type = Common::EVENT_MOUSEMOVE;
- } else if ( axis < -JOY_DEADZONE ) {
+ } else if (axis < -JOY_DEADZONE) {
axis += JOY_DEADZONE;
event.type = Common::EVENT_MOUSEMOVE;
} else
axis = 0;
- if ( ev.jaxis.axis == JOY_XAXIS) {
+ if (ev.jaxis.axis == JOY_XAXIS) {
#ifdef JOY_ANALOG
_km.x_vel = axis / 2000;
_km.x_down_count = 0;
@@ -759,7 +759,6 @@ bool SdlEventSource::handleJoyAxisMotion(SDL_Event &ev, Common::Event &event) {
_km.x_down_count = 0;
}
#endif
-
} else if (ev.jaxis.axis == JOY_YAXIS) {
#ifndef JOY_INVERT_Y
axis = -axis;