diff options
-rw-r--r-- | src/gui/setup_video.cpp | 1 | ||||
-rw-r--r-- | src/render/graphics.cpp | 7 | ||||
-rw-r--r-- | src/render/graphics.h | 2 |
3 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp index 9dd2484df..7b33fea22 100644 --- a/src/gui/setup_video.cpp +++ b/src/gui/setup_video.cpp @@ -511,6 +511,7 @@ void Setup_Video::action(const gcn::ActionEvent &event) } } #else + mainGraphics->setWindowSize(width, height); client->resizeVideo(width, height); #endif } diff --git a/src/render/graphics.cpp b/src/render/graphics.cpp index 8a6c3e858..b33b9edcd 100644 --- a/src/render/graphics.cpp +++ b/src/render/graphics.cpp @@ -584,3 +584,10 @@ bool Graphics::calcImageRect(ImageVertexes *const vert, BLOCK_END("Graphics::calcImageRect") return 0; } + +void Graphics::setWindowSize(const int width, const int height) +{ +#ifdef USE_SDL2 + SDL_SetWindowSize(mWindow, width, height); +#endif +} diff --git a/src/render/graphics.h b/src/render/graphics.h index eec6e4c9d..3d6a9fa62 100644 --- a/src/render/graphics.h +++ b/src/render/graphics.h @@ -267,6 +267,8 @@ class Graphics : public gcn::Graphics */ virtual void updateScreen() = 0; + void setWindowSize(const int width, const int height); + /** * Returns the width of the screen. */ |