Skip to content

Commit

Permalink
SDL: Minor code cleanup to declare variables at point of first use
Browse files Browse the repository at this point in the history
  • Loading branch information
csnover committed Oct 15, 2017
1 parent 9e9972a commit 319ab07
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions backends/graphics/surfacesdl/surfacesdl-graphics.cpp
Expand Up @@ -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;
Expand All @@ -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;

Expand Down

0 comments on commit 319ab07

Please sign in to comment.