diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-02-15 14:40:30 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-02-15 14:40:30 +0300 |
commit | dcbbdd05eee119559d3603b91c9140431b8545f7 (patch) | |
tree | e8a944ab975c39c6ec1ef86528c25878aad3814d /src/render | |
parent | fc1347c730964ef9c0f331f120008c0e7a5fa07e (diff) | |
download | manaplus-dcbbdd05eee119559d3603b91c9140431b8545f7.tar.gz manaplus-dcbbdd05eee119559d3603b91c9140431b8545f7.tar.bz2 manaplus-dcbbdd05eee119559d3603b91c9140431b8545f7.tar.xz manaplus-dcbbdd05eee119559d3603b91c9140431b8545f7.zip |
Fix scale apply if using SDL 2.
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/graphics.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/render/graphics.cpp b/src/render/graphics.cpp index 409626c09..7e3687006 100644 --- a/src/render/graphics.cpp +++ b/src/render/graphics.cpp @@ -433,11 +433,13 @@ bool Graphics::resizeScreen(const int width, const int height) mRect.h = height / mScale; mWidth = width / mScale; mHeight = height / mScale; + mActualWidth = width; + mActualHeight = height; #ifdef USE_OPENGL // +++ probably this way will not work in windows/mac // Setup OpenGL - glViewport(0, 0, mWidth, mHeight); + glViewport(0, 0, mActualWidth, mActualHeight); glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST); #else // +++ need impliment resize in soft mode |