From eb9841897bbe93da6aa4ca2537a3e22b3a868d98 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 27 Aug 2013 19:30:48 +0300 Subject: fix compilation warnings. --- src/graphics.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/graphics.cpp') 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 -- cgit v1.2.3-60-g2f50