From 0a495f7faa35530510549ad6510783e993fb2b6f Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 9 Jan 2013 06:59:22 +0100 Subject: OPENGL: Silence C++11 narrowing warning. --- backends/graphics/opengl/gltexture.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'backends/graphics') diff --git a/backends/graphics/opengl/gltexture.cpp b/backends/graphics/opengl/gltexture.cpp index ce69dc4aab..48da7f8e93 100644 --- a/backends/graphics/opengl/gltexture.cpp +++ b/backends/graphics/opengl/gltexture.cpp @@ -177,10 +177,10 @@ void GLTexture::drawTexture(GLshort x, GLshort y, GLshort w, GLshort h) { // Calculate the screen rect where the texture will be drawn const GLshort vertices[] = { - x, y, - x + w, y, - x, y + h, - x + w, y + h, + x, y, + (GLshort)(x + w), y, + x, (GLshort)(y + h), + (GLshort)(x + w), (GLshort)(y + h), }; glVertexPointer(2, GL_SHORT, 0, vertices); CHECK_GL_ERROR(); -- cgit v1.2.3 From 9f22d60adf62843fac04255d79f1986cdb7fa28a Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 9 Jan 2013 07:00:12 +0100 Subject: SDL: Silence C++ narrowing warnings. --- backends/graphics/surfacesdl/surfacesdl-graphics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backends/graphics') diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp index fb964d6951..02e58ab319 100644 --- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp +++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp @@ -968,7 +968,7 @@ void SurfaceSdlGraphicsManager::internUpdateScreen() { // If the shake position changed, fill the dirty area with blackness if (_currentShakePos != _newShakePos || (_mouseNeedsRedraw && _mouseBackup.y <= _currentShakePos)) { - SDL_Rect blackrect = {0, 0, _videoMode.screenWidth * _videoMode.scaleFactor, _newShakePos * _videoMode.scaleFactor}; + SDL_Rect blackrect = {0, 0, (Uint16)(_videoMode.screenWidth * _videoMode.scaleFactor), (Uint16)(_newShakePos * _videoMode.scaleFactor)}; if (_videoMode.aspectRatioCorrection && !_overlayVisible) blackrect.h = real2Aspect(blackrect.h - 1) + 1; -- cgit v1.2.3