diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-08-22 11:59:38 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-08-24 21:08:15 +0300 |
commit | 2480ea4cc668ff99007dd6fb8b44911eea5d5287 (patch) | |
tree | c8fc22a9612d30474cddd6d40da5269ffd7f55a5 /src/graphics.cpp | |
parent | 07390a4c8dcde85602c1a91d3773061d67d169ab (diff) | |
download | manaverse-2480ea4cc668ff99007dd6fb8b44911eea5d5287.tar.gz manaverse-2480ea4cc668ff99007dd6fb8b44911eea5d5287.tar.bz2 manaverse-2480ea4cc668ff99007dd6fb8b44911eea5d5287.tar.xz manaverse-2480ea4cc668ff99007dd6fb8b44911eea5d5287.zip |
store window size into rectangle.
Diffstat (limited to 'src/graphics.cpp')
-rw-r--r-- | src/graphics.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/graphics.cpp b/src/graphics.cpp index ac219bc9a..d1d5a9590 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -148,9 +148,14 @@ bool Graphics::setOpenGLMode() if (!(mWindow = graphicsManager.createWindow(mWidth, mHeight, mBpp, getOpenGLFlags()))) { + mRect.w = 0; + mRect.h = 0; return false; } + mRect.w = static_cast<uint16_t>(mWindow->w); + mRect.h = static_cast<uint16_t>(mWindow->h); + #ifdef __APPLE__ if (mSync) { |