Use int type for flip argument, as it's a bitfield and not a real enum

This commit is contained in:
Dmitry Marakasov 2013-12-18 05:55:09 +04:00
parent 4c46058a4b
commit 51aee70136
2 changed files with 3 additions and 3 deletions

View File

@ -69,8 +69,8 @@ void Renderer::Copy(Texture& texture, const Rect& srcrect, const Rect& dstrect)
throw Exception("SDL_RenderCopy failed"); throw Exception("SDL_RenderCopy failed");
} }
void Renderer::Copy(Texture& texture, const Rect& srcrect, const Rect& dstrect, double angle, const Point& center, SDL_RendererFlip flip) { 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(), flip) != 0) if (SDL_RenderCopyEx(renderer_, texture.Get(), srcrect.Get(), dstrect.Get(), angle, center.Get(), static_cast<SDL_RendererFlip>(flip)) != 0)
throw Exception("SDL_RenderCopyEx failed"); throw Exception("SDL_RenderCopyEx failed");
} }

View File

@ -55,7 +55,7 @@ public:
void GetInfo(SDL_RendererInfo* info); 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);
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 SetDrawColor(Uint8 r, Uint8 g, Uint8 b, Uint8 a = 255);
void SetTarget(); void SetTarget();