summaryrefslogtreecommitdiff
path: root/src/graphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/graphics.cpp')
-rw-r--r--src/graphics.cpp5
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)
{