diff options
author | Johannes Schickel | 2015-01-07 20:37:08 +0100 |
---|---|---|
committer | Johannes Schickel | 2015-01-07 20:38:20 +0100 |
commit | 1124d1db316c8b1bd67bcb00520b3a55d99d5cf4 (patch) | |
tree | af8702538fffe2fb5e846d2a1240d51eb6676bbf /backends/graphics/opengl | |
parent | f879f8af04b5114d05d3adadf3c1efac49cf8b91 (diff) | |
download | scummvm-rg350-1124d1db316c8b1bd67bcb00520b3a55d99d5cf4.tar.gz scummvm-rg350-1124d1db316c8b1bd67bcb00520b3a55d99d5cf4.tar.bz2 scummvm-rg350-1124d1db316c8b1bd67bcb00520b3a55d99d5cf4.zip |
OPENGL: Fix truncation issue resulting in wrong mouse coordinates.
Diffstat (limited to 'backends/graphics/opengl')
-rw-r--r-- | backends/graphics/opengl/opengl-graphics.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index bace9f468f..5821856c30 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -928,8 +928,8 @@ void OpenGLGraphicsManager::adjustMousePosition(int16 &x, int16 &y) { const int16 width = _gameScreen->getWidth(); const int16 height = _gameScreen->getHeight(); - x = (x * width) / _displayWidth; - y = (y * height) / _displayHeight; + x = (x * width) / (int)_displayWidth; + y = (y * height) / (int)_displayHeight; // Make sure we only supply valid coordinates. x = CLIP<int16>(x, 0, width - 1); |