From 2480ea4cc668ff99007dd6fb8b44911eea5d5287 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 22 Aug 2013 11:59:38 +0300 Subject: store window size into rectangle. --- src/graphics.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/graphics.cpp') 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(mWindow->w); + mRect.h = static_cast(mWindow->h); + #ifdef __APPLE__ if (mSync) { -- cgit v1.2.3-70-g09d2