aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/iphone/osys_events.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2013-04-18 23:37:54 +0200
committerWillem Jan Palenstijn2013-05-08 20:46:44 +0200
commit02c5cc75a7cb8885d2a0fa141fbc0e763c5b31a0 (patch)
tree72b64a67ebeca41e9b83593da80850e848a99e2e /backends/platform/iphone/osys_events.cpp
parent1539023834a2ad7cf8942711d60983891a10a82a (diff)
parent1e200620d673af4acdd2d128ed6e390df001aacf (diff)
downloadscummvm-rg350-02c5cc75a7cb8885d2a0fa141fbc0e763c5b31a0.tar.gz
scummvm-rg350-02c5cc75a7cb8885d2a0fa141fbc0e763c5b31a0.tar.bz2
scummvm-rg350-02c5cc75a7cb8885d2a0fa141fbc0e763c5b31a0.zip
Merge branch 'master'
Conflicts: configure base/plugins.cpp
Diffstat (limited to 'backends/platform/iphone/osys_events.cpp')
-rw-r--r--backends/platform/iphone/osys_events.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/backends/platform/iphone/osys_events.cpp b/backends/platform/iphone/osys_events.cpp
index 85efbda208..9cfca0836e 100644
--- a/backends/platform/iphone/osys_events.cpp
+++ b/backends/platform/iphone/osys_events.cpp
@@ -46,41 +46,40 @@ bool OSystem_IPHONE::pollEvent(Common::Event &event) {
return true;
}
- int eventType;
- int x, y;
+ InternalEvent internalEvent;
- if (iPhone_fetchEvent(&eventType, &x, &y)) {
- switch ((InputEvent)eventType) {
+ if (iPhone_fetchEvent(&internalEvent)) {
+ switch (internalEvent.type) {
case kInputMouseDown:
- if (!handleEvent_mouseDown(event, x, y))
+ if (!handleEvent_mouseDown(event, internalEvent.value1, internalEvent.value2))
return false;
break;
case kInputMouseUp:
- if (!handleEvent_mouseUp(event, x, y))
+ if (!handleEvent_mouseUp(event, internalEvent.value1, internalEvent.value2))
return false;
break;
case kInputMouseDragged:
- if (!handleEvent_mouseDragged(event, x, y))
+ if (!handleEvent_mouseDragged(event, internalEvent.value1, internalEvent.value2))
return false;
break;
case kInputMouseSecondDragged:
- if (!handleEvent_mouseSecondDragged(event, x, y))
+ if (!handleEvent_mouseSecondDragged(event, internalEvent.value1, internalEvent.value2))
return false;
break;
case kInputMouseSecondDown:
_secondaryTapped = true;
- if (!handleEvent_secondMouseDown(event, x, y))
+ if (!handleEvent_secondMouseDown(event, internalEvent.value1, internalEvent.value2))
return false;
break;
case kInputMouseSecondUp:
_secondaryTapped = false;
- if (!handleEvent_secondMouseUp(event, x, y))
+ if (!handleEvent_secondMouseUp(event, internalEvent.value1, internalEvent.value2))
return false;
break;
case kInputOrientationChanged:
- handleEvent_orientationChanged(x);
+ handleEvent_orientationChanged(internalEvent.value1);
return false;
break;
@@ -90,11 +89,11 @@ bool OSystem_IPHONE::pollEvent(Common::Event &event) {
break;
case kInputKeyPressed:
- handleEvent_keyPressed(event, x);
+ handleEvent_keyPressed(event, internalEvent.value1);
break;
case kInputSwipe:
- if (!handleEvent_swipe(event, x))
+ if (!handleEvent_swipe(event, internalEvent.value1))
return false;
break;