[Scummvm-git-logs] scummvm master -> 0a8049e30c97acac5ae5f55a722173dfbc20cd25
bgK
bastien.bouclet at gmail.com
Thu Jun 27 20:14:44 CEST 2019
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
0a8049e30c SDL: Fix gamepad mouse cursor wrapping on hi-res screens
Commit: 0a8049e30c97acac5ae5f55a722173dfbc20cd25
https://github.com/scummvm/scummvm/commit/0a8049e30c97acac5ae5f55a722173dfbc20cd25
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2019-06-27T20:12:52+02:00
Commit Message:
SDL: Fix gamepad mouse cursor wrapping on hi-res screens
The cursor position was overflowing a signed 16-bits integer once
multiplied with MULTIPLIER when using a resolution such as 2560x1440.
It would be nice changing this code to make more sense, sadly it is
thightly coupled with platform specific subclasses.
Fixes #10996.
Changed paths:
backends/events/sdl/sdl-events.cpp
backends/events/sdl/sdl-events.h
diff --git a/backends/events/sdl/sdl-events.cpp b/backends/events/sdl/sdl-events.cpp
index 5023517..29be7d4 100644
--- a/backends/events/sdl/sdl-events.cpp
+++ b/backends/events/sdl/sdl-events.cpp
@@ -287,8 +287,8 @@ void SdlEventSource::updateKbdMouse() {
}
bool SdlEventSource::handleKbdMouse(Common::Event &event) {
- int16 oldKmX = _km.x;
- int16 oldKmY = _km.y;
+ int32 oldKmX = _km.x;
+ int32 oldKmY = _km.y;
updateKbdMouse();
diff --git a/backends/events/sdl/sdl-events.h b/backends/events/sdl/sdl-events.h
index 8ee5114..c2ae002 100644
--- a/backends/events/sdl/sdl-events.h
+++ b/backends/events/sdl/sdl-events.h
@@ -66,7 +66,8 @@ protected:
//@{
struct KbdMouse {
- int16 x, y, x_vel, y_vel, x_max, y_max, x_down_count, y_down_count, joy_x, joy_y;
+ int32 x, y;
+ int16 x_vel, y_vel, x_max, y_max, x_down_count, y_down_count, joy_x, joy_y;
uint32 last_time, delay_time, x_down_time, y_down_time;
bool modifier;
};
More information about the Scummvm-git-logs
mailing list