diff options
author | Tarek Soliman | 2017-10-19 00:55:58 -0500 |
---|---|---|
committer | Tarek Soliman | 2017-10-19 17:51:01 -0500 |
commit | 2fea095fc7202a6707c6f5499565f125927ae544 (patch) | |
tree | ef58780d2f7937cb9407080b81bb5e65487b3efd /backends/graphics | |
parent | 0e44feadb0ed5a39ab3926d837d1d388f931426f (diff) | |
download | scummvm-rg350-2fea095fc7202a6707c6f5499565f125927ae544.tar.gz scummvm-rg350-2fea095fc7202a6707c6f5499565f125927ae544.tar.bz2 scummvm-rg350-2fea095fc7202a6707c6f5499565f125927ae544.zip |
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.
Diffstat (limited to 'backends/graphics')
-rw-r--r-- | backends/graphics/surfacesdl/surfacesdl-graphics.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp index b616914e53..262ea84096 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) |