From 3e3619feb87c9b63a0dae08c2dd29ed43dc1bc82 Mon Sep 17 00:00:00 2001 From: dhewg Date: Fri, 18 Mar 2011 22:14:54 +0100 Subject: ANDROID: Cleanup --- backends/platform/android/events.cpp | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/backends/platform/android/events.cpp b/backends/platform/android/events.cpp index 2f6049224a..5fc10b2161 100644 --- a/backends/platform/android/events.cpp +++ b/backends/platform/android/events.cpp @@ -381,14 +381,14 @@ void OSystem_Android::pushEvent(int type, int arg1, int arg2, int arg3, case JKEYCODE_DPAD_DOWN: case JKEYCODE_DPAD_LEFT: case JKEYCODE_DPAD_RIGHT: - { - if (arg1 != JACTION_DOWN) - return; + if (arg1 != JACTION_DOWN) + return; - e.type = Common::EVENT_MOUSEMOVE; + e.type = Common::EVENT_MOUSEMOVE; - e.mouse = getEventManager()->getMousePos(); + e.mouse = getEventManager()->getMousePos(); + { int16 *c; int s; @@ -408,13 +408,13 @@ void OSystem_Android::pushEvent(int type, int arg1, int arg2, int arg3, *c -= f; else *c += f; + } - clipMouse(e.mouse); + clipMouse(e.mouse); - lockMutex(_event_queue_lock); - _event_queue.push(e); - unlockMutex(_event_queue_lock); - } + lockMutex(_event_queue_lock); + _event_queue.push(e); + unlockMutex(_event_queue_lock); return; @@ -431,15 +431,11 @@ void OSystem_Android::pushEvent(int type, int arg1, int arg2, int arg3, return; } - { - const Common::Point &m = getEventManager()->getMousePos(); - - e.mouse = m; + e.mouse = getEventManager()->getMousePos(); - lockMutex(_event_queue_lock); - _event_queue.push(e); - unlockMutex(_event_queue_lock); - } + lockMutex(_event_queue_lock); + _event_queue.push(e); + unlockMutex(_event_queue_lock); return; } -- cgit v1.2.3