aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorJohannes Schickel2012-02-15 00:14:47 +0100
committerJohannes Schickel2012-02-15 02:22:30 +0100
commit56971f11d1b086fe057e5b658afd318bebb429cc (patch)
tree311982b6c3ea31d6648d14836f864dd7a1eb05d3 /backends
parent8faf01647817e8882164c567d644d0af616583eb (diff)
downloadscummvm-rg350-56971f11d1b086fe057e5b658afd318bebb429cc.tar.gz
scummvm-rg350-56971f11d1b086fe057e5b658afd318bebb429cc.tar.bz2
scummvm-rg350-56971f11d1b086fe057e5b658afd318bebb429cc.zip
OPENGL: Remove redundant check in adjustMousePosition.
Diffstat (limited to 'backends')
-rw-r--r--backends/graphics/opengl/opengl-graphics.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp
index edc7a5f28e..f4ffd47f75 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -1276,15 +1276,13 @@ void OpenGLGraphicsManager::adjustMousePosition(int16 &x, int16 &y) {
if (_overlayVisible)
return;
- if (!_overlayVisible) {
- x -= _displayX;
- y -= _displayY;
-
- if (_displayWidth != _videoMode.screenWidth)
- x = x * _videoMode.screenWidth / _displayWidth;
- if (_displayHeight != _videoMode.screenHeight)
- y = y * _videoMode.screenHeight / _displayHeight;
- }
+ x -= _displayX;
+ y -= _displayY;
+
+ if (_displayWidth != _videoMode.screenWidth)
+ x = x * _videoMode.screenWidth / _displayWidth;
+ if (_displayHeight != _videoMode.screenHeight)
+ y = y * _videoMode.screenHeight / _displayHeight;
}
bool OpenGLGraphicsManager::saveScreenshot(const char *filename) {