diff options
Diffstat (limited to 'src/graphics.cpp')
-rw-r--r-- | src/graphics.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/graphics.cpp b/src/graphics.cpp index e0666a36a..0fd8fced9 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -361,6 +361,25 @@ bool Graphics::resizeScreen(const int width, const int height) _endDraw(); +#ifdef USE_SDL2 + mRect.w = width; + mRect.h = height; + mWidth = width; + mHeight = height; + +#ifdef USE_OPENGL + // +++ probably this way will not work in windows/mac + // Setup OpenGL + glViewport(0, 0, mWidth, mHeight); + glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST); +#else + // +++ need impliment resize in soft mode +#endif + + _beginDraw(); + return true; + +#else const bool success = setVideoMode(width, height, mBpp, mFullscreen, mHWAccel, mEnableResize, mNoFrame); @@ -378,6 +397,7 @@ bool Graphics::resizeScreen(const int width, const int height) _beginDraw(); return success; +#endif } int Graphics::getWidth() const |