aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Snover2017-09-13 01:16:07 -0500
committerColin Snover2017-10-15 13:24:20 -0500
commit319ab07fe0900e6ec2f89666b544e695edca6dde (patch)
tree8063348e17110dd05a3e6bcb276654eace7c3f5d
parent9e9972a55b6a9e19f8bff37e023d622262e22096 (diff)
downloadscummvm-rg350-319ab07fe0900e6ec2f89666b544e695edca6dde.tar.gz
scummvm-rg350-319ab07fe0900e6ec2f89666b544e695edca6dde.tar.bz2
scummvm-rg350-319ab07fe0900e6ec2f89666b544e695edca6dde.zip
SDL: Minor code cleanup to declare variables at point of first use
-rw-r--r--backends/graphics/surfacesdl/surfacesdl-graphics.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index 9b6cbb91e1..ceb1a3799b 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -1991,9 +1991,7 @@ void SurfaceSdlGraphicsManager::blitCursor() {
dstPtr += _mouseOrigSurface->pitch - w * 2;
}
- int rW, rH;
int cursorScale;
-
if (_cursorDontScale) {
// Don't scale the cursor at all if the user requests this behavior.
cursorScale = 1;
@@ -2003,8 +2001,8 @@ void SurfaceSdlGraphicsManager::blitCursor() {
}
// Adapt the real hotspot according to the scale factor.
- rW = w * cursorScale;
- rH = h * cursorScale;
+ int rW = w * cursorScale;
+ int rH = h * cursorScale;
_mouseCurState.rHotX = _mouseCurState.hotX * cursorScale;
_mouseCurState.rHotY = _mouseCurState.hotY * cursorScale;