summaryrefslogtreecommitdiff
path: root/src/render/graphics.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-04-29 20:20:48 +0300
committerAndrei Karas <akaras@inbox.ru>2014-04-29 20:20:48 +0300
commitc24fefa91a1416a4dad7fd97d67cefa51f9eb97c (patch)
tree4a8d894f6932dfcb95268121bed3c433c2461bd0 /src/render/graphics.cpp
parent03418ce78766b062ce5af7aaf99f7f2c62152b6b (diff)
downloadmanaplus-c24fefa91a1416a4dad7fd97d67cefa51f9eb97c.tar.gz
manaplus-c24fefa91a1416a4dad7fd97d67cefa51f9eb97c.tar.bz2
manaplus-c24fefa91a1416a4dad7fd97d67cefa51f9eb97c.tar.xz
manaplus-c24fefa91a1416a4dad7fd97d67cefa51f9eb97c.zip
Add type defines for SDL_Rect based on SDL version.
Diffstat (limited to 'src/render/graphics.cpp')
-rw-r--r--src/render/graphics.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/render/graphics.cpp b/src/render/graphics.cpp
index 3a423aac2..5437e6737 100644
--- a/src/render/graphics.cpp
+++ b/src/render/graphics.cpp
@@ -205,8 +205,8 @@ void Graphics::setScale(int scale)
mWidth = mActualWidth;
mHeight = mActualHeight;
}
- mRect.w = mWidth;
- mRect.h = mHeight;
+ mRect.w = static_cast<RectSize>(mWidth);
+ mRect.h = static_cast<RectSize>(mHeight);
}
int Graphics::getOpenGLFlags() const
@@ -261,8 +261,8 @@ bool Graphics::setOpenGLMode()
int w1 = 0;
int h1 = 0;
SDL_GetWindowSize(mWindow, &w1, &h1);
- mRect.w = w1 / mScale;
- mRect.h = h1 / mScale;
+ mRect.w = static_cast<int32_t>(w1 / mScale);
+ mRect.h = static_cast<int32_t>(h1 / mScale);
mGLContext = SDL_GL_CreateContext(mWindow);
@@ -472,8 +472,8 @@ bool Graphics::resizeScreen(const int width, const int height)
#ifdef USE_SDL2
endDraw();
- mRect.w = width / mScale;
- mRect.h = height / mScale;
+ mRect.w = static_cast<int32_t>(width / mScale);
+ mRect.h = static_cast<int32_t>(height / mScale);
mWidth = width / mScale;
mHeight = height / mScale;
mActualWidth = width;