summaryrefslogtreecommitdiff
path: root/src/graphics.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-27 19:30:48 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-27 19:30:48 +0300
commiteb9841897bbe93da6aa4ca2537a3e22b3a868d98 (patch)
treeb909446a61e26056b69a9272a9b48e314fda3957 /src/graphics.cpp
parent0b3166a9a06313266b868785fc69a9dee76b0a1d (diff)
downloadplus-eb9841897bbe93da6aa4ca2537a3e22b3a868d98.tar.gz
plus-eb9841897bbe93da6aa4ca2537a3e22b3a868d98.tar.bz2
plus-eb9841897bbe93da6aa4ca2537a3e22b3a868d98.tar.xz
plus-eb9841897bbe93da6aa4ca2537a3e22b3a868d98.zip
fix compilation warnings.
Diffstat (limited to 'src/graphics.cpp')
-rw-r--r--src/graphics.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/graphics.cpp b/src/graphics.cpp
index 4e2129cbf..604454e94 100644
--- a/src/graphics.cpp
+++ b/src/graphics.cpp
@@ -386,12 +386,9 @@ bool Graphics::resizeScreen(const int width, const int height)
if (mWidth == width && mHeight == height)
return true;
- const int prevWidth = mWidth;
- const int prevHeight = mHeight;
-
+#ifdef USE_SDL2
_endDraw();
-#ifdef USE_SDL2
mRect.w = width;
mRect.h = height;
mWidth = width;
@@ -404,12 +401,17 @@ bool Graphics::resizeScreen(const int width, const int height)
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST);
#else
// +++ need impliment resize in soft mode
-#endif
+#endif // USE_OPENGL
_beginDraw();
return true;
#else
+ const int prevWidth = mWidth;
+ const int prevHeight = mHeight;
+
+ _endDraw();
+
const bool success = setVideoMode(width, height, mBpp,
mFullscreen, mHWAccel, mEnableResize, mNoFrame);
@@ -427,7 +429,7 @@ bool Graphics::resizeScreen(const int width, const int height)
_beginDraw();
return success;
-#endif
+#endif // USE_SDL2
}
int Graphics::getWidth() const