From 319ab07fe0900e6ec2f89666b544e695edca6dde Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Wed, 13 Sep 2017 01:16:07 -0500 Subject: [PATCH] SDL: Minor code cleanup to declare variables at point of first use --- backends/graphics/surfacesdl/surfacesdl-graphics.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp index 9b6cbb91e125..ceb1a3799b54 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;