From 40391ad084698f48342aa6283ce92b65e0b7d3cc Mon Sep 17 00:00:00 2001 From: Pieter Hulshoff Date: Sun, 19 Jun 2016 21:22:47 +0200 Subject: [PATCH] Fixed Windows compile warnings/errors. --- RetroFE/Source/SDL.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/RetroFE/Source/SDL.cpp b/RetroFE/Source/SDL.cpp index c2c3e90..9fbd663 100644 --- a/RetroFE/Source/SDL.cpp +++ b/RetroFE/Source/SDL.cpp @@ -277,7 +277,7 @@ bool SDL::renderCopy(SDL_Texture *texture, unsigned char alpha, SDL_Rect *src, S if (reflection == "top") { - rotateRect.h = rotateRect.h * reflectionScale; + rotateRect.h = static_cast(static_cast(rotateRect.h) * reflectionScale); rotateRect.y = rotateRect.y - rotateRect.h - reflectionDistance; SDL_SetTextureAlphaMod(texture, reflectionAlpha * alpha); SDL_RenderCopyEx(getRenderer(), texture, src, &rotateRect, angle, NULL, SDL_FLIP_VERTICAL); @@ -286,14 +286,14 @@ bool SDL::renderCopy(SDL_Texture *texture, unsigned char alpha, SDL_Rect *src, S if (reflection == "bottom") { rotateRect.y = rotateRect.y + rotateRect.h + reflectionDistance; - rotateRect.h = rotateRect.h * reflectionScale; + rotateRect.h = static_cast(static_cast(rotateRect.h) * reflectionScale); SDL_SetTextureAlphaMod(texture, reflectionAlpha * alpha); SDL_RenderCopyEx(getRenderer(), texture, src, &rotateRect, angle, NULL, SDL_FLIP_VERTICAL); } if (reflection == "left") { - rotateRect.w = rotateRect.w * reflectionScale; + rotateRect.w = static_cast(static_cast(rotateRect.w) * reflectionScale); rotateRect.x = rotateRect.x - rotateRect.w - reflectionDistance; SDL_SetTextureAlphaMod(texture, reflectionAlpha * alpha); SDL_RenderCopyEx(getRenderer(), texture, src, &rotateRect, angle, NULL, SDL_FLIP_HORIZONTAL); @@ -302,7 +302,7 @@ bool SDL::renderCopy(SDL_Texture *texture, unsigned char alpha, SDL_Rect *src, S if (reflection == "right") { rotateRect.x = rotateRect.x + rotateRect.w + reflectionDistance; - rotateRect.w = rotateRect.w * reflectionScale; + rotateRect.w = static_cast(static_cast(rotateRect.w) * reflectionScale); SDL_SetTextureAlphaMod(texture, reflectionAlpha * alpha); SDL_RenderCopyEx(getRenderer(), texture, src, &rotateRect, angle, NULL, SDL_FLIP_HORIZONTAL); }