From 51aee701361fac8ba2940d895cc1ec411d7a343a Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Wed, 18 Dec 2013 05:55:09 +0400 Subject: [PATCH] Use int type for flip argument, as it's a bitfield and not a real enum --- SDL2pp/Renderer.cc | 4 ++-- SDL2pp/Renderer.hh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SDL2pp/Renderer.cc b/SDL2pp/Renderer.cc index 7862de7..c9612ad 100644 --- a/SDL2pp/Renderer.cc +++ b/SDL2pp/Renderer.cc @@ -69,8 +69,8 @@ void Renderer::Copy(Texture& texture, const Rect& srcrect, const Rect& dstrect) throw Exception("SDL_RenderCopy failed"); } -void Renderer::Copy(Texture& texture, const Rect& srcrect, const Rect& dstrect, double angle, const Point& center, SDL_RendererFlip flip) { - if (SDL_RenderCopyEx(renderer_, texture.Get(), srcrect.Get(), dstrect.Get(), angle, center.Get(), flip) != 0) +void Renderer::Copy(Texture& texture, const Rect& srcrect, const Rect& dstrect, double angle, const Point& center, int flip) { + if (SDL_RenderCopyEx(renderer_, texture.Get(), srcrect.Get(), dstrect.Get(), angle, center.Get(), static_cast(flip)) != 0) throw Exception("SDL_RenderCopyEx failed"); } diff --git a/SDL2pp/Renderer.hh b/SDL2pp/Renderer.hh index 034fe6e..9d0e95e 100644 --- a/SDL2pp/Renderer.hh +++ b/SDL2pp/Renderer.hh @@ -55,7 +55,7 @@ public: void GetInfo(SDL_RendererInfo* info); void Copy(Texture& texture, const Rect& srcrect, const Rect& dstrect); - void Copy(Texture& texture, const Rect& srcrect, const Rect& dstrect, double angle, const Point& center, SDL_RendererFlip flip); + void Copy(Texture& texture, const Rect& srcrect, const Rect& dstrect, double angle, const Point& center, int flip); void SetDrawColor(Uint8 r, Uint8 g, Uint8 b, Uint8 a = 255); void SetTarget();