aboutsummaryrefslogtreecommitdiff
path: root/backends/events/openpandora
diff options
context:
space:
mode:
authorrsn88872017-02-16 03:19:59 -0600
committerrsn88872017-02-17 17:55:09 -0600
commit613c6f4f7f3a64f857ca59e453b5e53d01e64899 (patch)
treeb43962e434d4d657e5e0140110b49b5c09ded421 /backends/events/openpandora
parentc0d155db972323b87af0964f59676be091c76be6 (diff)
downloadscummvm-rg350-613c6f4f7f3a64f857ca59e453b5e53d01e64899.tar.gz
scummvm-rg350-613c6f4f7f3a64f857ca59e453b5e53d01e64899.tar.bz2
scummvm-rg350-613c6f4f7f3a64f857ca59e453b5e53d01e64899.zip
SDL: More fixes to jerky analog joystick pointer
For some engines such as Dreamweb that a previous fix did not apply to, this fixes bug 6996: Android: Mouse pointer control with analog joystick is unusable
Diffstat (limited to 'backends/events/openpandora')
-rw-r--r--backends/events/openpandora/op-events.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/backends/events/openpandora/op-events.cpp b/backends/events/openpandora/op-events.cpp
index b9d5fa8c7b..dbfcc4ed2c 100644
--- a/backends/events/openpandora/op-events.cpp
+++ b/backends/events/openpandora/op-events.cpp
@@ -126,18 +126,18 @@ bool OPEventSource::remapKey(SDL_Event &ev, Common::Event &event) {
switch (ev.key.keysym.sym) {
case SDLK_LEFT:
event.type = (ev.type == SDL_KEYDOWN) ? Common::EVENT_LBUTTONDOWN : Common::EVENT_LBUTTONUP;
- processMouseEvent(event, _km.x, _km.y);
+ processMouseEvent(event, _km.x / _km.multiplier, _km.y / _km.multiplier);
return true;
break;
case SDLK_RIGHT:
event.type = (ev.type == SDL_KEYDOWN) ? Common::EVENT_RBUTTONDOWN : Common::EVENT_RBUTTONUP;
- processMouseEvent(event, _km.x, _km.y);
+ processMouseEvent(event, _km.x / _km.multiplier, _km.y / _km.multiplier);
return true;
break;
#if defined(SDL_BUTTON_MIDDLE)
case SDLK_UP:
event.type = (ev.type == SDL_KEYDOWN) ? Common::EVENT_MBUTTONDOWN : Common::EVENT_MBUTTONUP;
- processMouseEvent(event, _km.x, _km.y);
+ processMouseEvent(event, _km.x / _km.multiplier, _km.y / _km.multiplier);
return true;
break;
#endif
@@ -150,12 +150,12 @@ bool OPEventSource::remapKey(SDL_Event &ev, Common::Event &event) {
switch (ev.key.keysym.sym) {
case SDLK_HOME:
event.type = Common::EVENT_LBUTTONDOWN;
- processMouseEvent(event, _km.x, _km.y);
+ processMouseEvent(event, _km.x / _km.multiplier, _km.y / _km.multiplier);
return true;
break;
case SDLK_END:
event.type = Common::EVENT_RBUTTONDOWN;
- processMouseEvent(event, _km.x, _km.y);
+ processMouseEvent(event, _km.x / _km.multiplier, _km.y / _km.multiplier);
return true;
break;
case SDLK_PAGEDOWN:
@@ -188,12 +188,12 @@ bool OPEventSource::remapKey(SDL_Event &ev, Common::Event &event) {
switch (ev.key.keysym.sym) {
case SDLK_HOME:
event.type = Common::EVENT_LBUTTONUP;
- processMouseEvent(event, _km.x, _km.y);
+ processMouseEvent(event, _km.x / _km.multiplier, _km.y / _km.multiplier);
return true;
break;
case SDLK_END:
event.type = Common::EVENT_RBUTTONUP;
- processMouseEvent(event, _km.x, _km.y);
+ processMouseEvent(event, _km.x / _km.multiplier, _km.y / _km.multiplier);
return true;
break;
case SDLK_PAGEDOWN: