[Scummvm-git-logs] scummvm master -> 2fea095fc7202a6707c6f5499565f125927ae544
tsoliman
tarek at bashasoliman.com
Sat Oct 21 00:01:38 CEST 2017
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:
2fea095fc7 SDL: Fix SDL1 cursor position when using a touchscreen
Commit: 2fea095fc7202a6707c6f5499565f125927ae544
https://github.com/scummvm/scummvm/commit/2fea095fc7202a6707c6f5499565f125927ae544
Author: Tarek Soliman (tsoliman at scummvm.org)
Date: 2017-10-19T17:51:01-05:00
Commit Message:
SDL: Fix SDL1 cursor position when using a touchscreen
I noticed that in Maemo the cursor was offset after the SDL refactoring
in de2bbe3b9738ef95b2529db989570770ef434f9d
In Maemo when entering fullscreen, ScummVM receives a SDL_VIDEORESIZE
event with the native touchscreen resolution rather than the current
window size. This causes a call to notifyResize.
Before that refactoring, notifyResize did nothing (in SDL1).
Now it calls handleResize but doesn't actually set a new video mode.
This messes up the coordinate mapping, causing an overcorrection for
the cursor position.
Changed paths:
backends/graphics/surfacesdl/surfacesdl-graphics.cpp
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index b616914..262ea84 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -2642,7 +2642,9 @@ void SurfaceSdlGraphicsManager::notifyVideoExpose() {
}
void SurfaceSdlGraphicsManager::notifyResize(const int width, const int height) {
+#if SDL_VERSION_ATLEAST(2, 0, 0)
handleResize(width, height);
+#endif
}
#if SDL_VERSION_ATLEAST(2, 0, 0)
More information about the Scummvm-git-logs
mailing list