From 1120c60cae4e58eb6be4862d9dff402fb3569fa9 Mon Sep 17 00:00:00 2001 From: Edward Rudd Date: Tue, 31 Dec 2013 19:31:14 -0500 Subject: [PATCH] fix viewport resizing on screen resize. --- src/graphics.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/graphics.cpp b/src/graphics.cpp index 2934073..a1875b1 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -469,8 +469,9 @@ struct GraphicsPrivate { if (threadData->windowSizeMsg.pollChange(&winSize.x, &winSize.y)) { + glState.viewport.init(IntRect(0, 0, winSize.x, winSize.y)); recalculateScreenSize(); - screen.setScreenSize(scSize.x, scSize.y); + screen.setScreenSize(winSize.x, winSize.y); updateScreenResoRatio(); } }