aboutsummaryrefslogtreecommitdiff
path: root/backends/events/gph/gph-events.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/events/gph/gph-events.cpp')
-rw-r--r--backends/events/gph/gph-events.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/backends/events/gph/gph-events.cpp b/backends/events/gph/gph-events.cpp
index 88fc97d3d1..06acfa489e 100644
--- a/backends/events/gph/gph-events.cpp
+++ b/backends/events/gph/gph-events.cpp
@@ -230,116 +230,116 @@ bool GPHEventSource::handleJoyButtonDown(SDL_Event &ev, Common::Event &event) {
switch (ev.jbutton.button) {
case BUTTON_UP:
if (_km.y_down_count != 2) {
- _km.y_vel = -1;
+ _km.y_vel = -1 * _km.multiplier;
_km.y_down_count = 1;
} else {
- _km.y_vel = -4;
+ _km.y_vel = -4 * _km.multiplier;
}
event.type = Common::EVENT_MOUSEMOVE;
- processMouseEvent(event, _km.x, _km.y);
+ processMouseEvent(event, _km.x / _km.multiplier, _km.y / _km.multiplier);
break;
case BUTTON_DOWN:
if (_km.y_down_count != 2) {
- _km.y_vel = 1;
+ _km.y_vel = 1 * _km.multiplier;
_km.y_down_count = 1;
} else {
- _km.y_vel = 4;
+ _km.y_vel = 4 * _km.multiplier;
}
event.type = Common::EVENT_MOUSEMOVE;
- processMouseEvent(event, _km.x, _km.y);
+ processMouseEvent(event, _km.x / _km.multiplier, _km.y / _km.multiplier);
break;
case BUTTON_LEFT:
if (_km.x_down_count != 2) {
- _km.x_vel = -1;
+ _km.x_vel = -1 * _km.multiplier;
_km.x_down_count = 1;
} else {
- _km.x_vel = -4;
+ _km.x_vel = -4 * _km.multiplier;
}
event.type = Common::EVENT_MOUSEMOVE;
- processMouseEvent(event, _km.x, _km.y);
+ processMouseEvent(event, _km.x / _km.multiplier, _km.y / _km.multiplier);
break;
case BUTTON_RIGHT:
if (_km.x_down_count != 3) {
- _km.x_vel = 1;
+ _km.x_vel = 1 * _km.multiplier;
_km.x_down_count = 1;
} else {
- _km.x_vel = 4;
+ _km.x_vel = 4 * _km.multiplier;
}
event.type = Common::EVENT_MOUSEMOVE;
- processMouseEvent(event, _km.x, _km.y);
+ processMouseEvent(event, _km.x / _km.multiplier, _km.y / _km.multiplier);
break;
case BUTTON_UPLEFT:
if (_km.x_down_count != 2) {
- _km.x_vel = -1;
+ _km.x_vel = -1 * _km.multiplier;
_km.x_down_count = 1;
} else {
- _km.x_vel = -4;
+ _km.x_vel = -4 * _km.multiplier;
}
if (_km.y_down_count != 2) {
- _km.y_vel = -1;
+ _km.y_vel = -1 * _km.multiplier;
_km.y_down_count = 1;
} else {
- _km.y_vel = -4;
+ _km.y_vel = -4 * _km.multiplier;
}
event.type = Common::EVENT_MOUSEMOVE;
- processMouseEvent(event, _km.x, _km.y);
+ processMouseEvent(event, _km.x / _km.multiplier, _km.y / _km.multiplier);
break;
case BUTTON_UPRIGHT:
if (_km.x_down_count != 2) {
- _km.x_vel = 1;
+ _km.x_vel = 1 * _km.multiplier;
_km.x_down_count = 1;
} else {
- _km.x_vel = 4;
+ _km.x_vel = 4 * _km.multiplier;
}
if (_km.y_down_count != 2) {
- _km.y_vel = -1;
+ _km.y_vel = -1 * _km.multiplier;
_km.y_down_count = 1;
} else {
- _km.y_vel = -4;
+ _km.y_vel = -4 * _km.multiplier;
}
event.type = Common::EVENT_MOUSEMOVE;
- processMouseEvent(event, _km.x, _km.y);
+ processMouseEvent(event, _km.x / _km.multiplier, _km.y / _km.multiplier);
break;
case BUTTON_DOWNLEFT:
if (_km.x_down_count != 2) {
- _km.x_vel = -1;
+ _km.x_vel = -1 * _km.multiplier;
_km.x_down_count = 1;
} else {
- _km.x_vel = -4;
+ _km.x_vel = -4 * _km.multiplier;
}
if (_km.y_down_count != 2) {
- _km.y_vel = 1;
+ _km.y_vel = 1 * _km.multiplier;
_km.y_down_count = 1;
} else {
- _km.y_vel = 4;
+ _km.y_vel = 4 * _km.multiplier;
}
event.type = Common::EVENT_MOUSEMOVE;
- processMouseEvent(event, _km.x, _km.y);
+ processMouseEvent(event, _km.x / _km.multiplier, _km.y / _km.multiplier);
break;
case BUTTON_DOWNRIGHT:
if (_km.x_down_count != 2) {
- _km.x_vel = 1;
+ _km.x_vel = 1 * _km.multiplier;
_km.x_down_count = 1;
} else {
- _km.x_vel = 4;
+ _km.x_vel = 4 * _km.multiplier;
}
if (_km.y_down_count != 2) {
- _km.y_vel = 1;
+ _km.y_vel = 1 * _km.multiplier;
_km.y_down_count = 1;
} else {
- _km.y_vel = 4;
+ _km.y_vel = 4 * _km.multiplier;
}
event.type = Common::EVENT_MOUSEMOVE;
- processMouseEvent(event, _km.x, _km.y);
+ processMouseEvent(event, _km.x / _km.multiplier, _km.y / _km.multiplier);
break;
case BUTTON_B:
case BUTTON_CLICK:
event.type = Common::EVENT_LBUTTONDOWN;
- processMouseEvent(event, _km.x, _km.y);
+ processMouseEvent(event, _km.x / _km.multiplier, _km.y / _km.multiplier);
break;
case BUTTON_X:
event.type = Common::EVENT_RBUTTONDOWN;
- processMouseEvent(event, _km.x, _km.y);
+ processMouseEvent(event, _km.x / _km.multiplier, _km.y / _km.multiplier);
break;
case BUTTON_L:
BUTTON_STATE_L = true;
@@ -454,16 +454,16 @@ bool GPHEventSource::handleJoyButtonUp(SDL_Event &ev, Common::Event &event) {
_km.x_vel = 0;
_km.x_down_count = 0;
event.type = Common::EVENT_MOUSEMOVE;
- processMouseEvent(event, _km.x, _km.y);
+ processMouseEvent(event, _km.x / _km.multiplier, _km.y / _km.multiplier);
break;
case BUTTON_B:
case BUTTON_CLICK:
event.type = Common::EVENT_LBUTTONUP;
- processMouseEvent(event, _km.x, _km.y);
+ processMouseEvent(event, _km.x / _km.multiplier, _km.y / _km.multiplier);
break;
case BUTTON_X:
event.type = Common::EVENT_RBUTTONUP;
- processMouseEvent(event, _km.x, _km.y);
+ processMouseEvent(event, _km.x / _km.multiplier, _km.y / _km.multiplier);
break;
case BUTTON_L:
BUTTON_STATE_L = false;