ANDROID: Cleanup

This commit is contained in:
dhewg 2011-03-18 22:14:54 +01:00
parent e056bfca9c
commit 3e3619feb8

View File

@ -381,14 +381,14 @@ void OSystem_Android::pushEvent(int type, int arg1, int arg2, int arg3,
case JKEYCODE_DPAD_DOWN: case JKEYCODE_DPAD_DOWN:
case JKEYCODE_DPAD_LEFT: case JKEYCODE_DPAD_LEFT:
case JKEYCODE_DPAD_RIGHT: case JKEYCODE_DPAD_RIGHT:
if (arg1 != JACTION_DOWN)
return;
e.type = Common::EVENT_MOUSEMOVE;
e.mouse = getEventManager()->getMousePos();
{ {
if (arg1 != JACTION_DOWN)
return;
e.type = Common::EVENT_MOUSEMOVE;
e.mouse = getEventManager()->getMousePos();
int16 *c; int16 *c;
int s; int s;
@ -408,14 +408,14 @@ void OSystem_Android::pushEvent(int type, int arg1, int arg2, int arg3,
*c -= f; *c -= f;
else else
*c += f; *c += f;
clipMouse(e.mouse);
lockMutex(_event_queue_lock);
_event_queue.push(e);
unlockMutex(_event_queue_lock);
} }
clipMouse(e.mouse);
lockMutex(_event_queue_lock);
_event_queue.push(e);
unlockMutex(_event_queue_lock);
return; return;
case JKEYCODE_DPAD_CENTER: case JKEYCODE_DPAD_CENTER:
@ -431,15 +431,11 @@ void OSystem_Android::pushEvent(int type, int arg1, int arg2, int arg3,
return; return;
} }
{ e.mouse = getEventManager()->getMousePos();
const Common::Point &m = getEventManager()->getMousePos();
e.mouse = m; lockMutex(_event_queue_lock);
_event_queue.push(e);
lockMutex(_event_queue_lock); unlockMutex(_event_queue_lock);
_event_queue.push(e);
unlockMutex(_event_queue_lock);
}
return; return;
} }