From 167da88546894717fc7ad487bae2a171e3bf789e Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Sat, 28 Nov 2015 18:46:32 +0300 Subject: [PATCH] SDL_SetClipRect returns SDL_TRUE, not 0 on success --- SDL2pp/Surface.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SDL2pp/Surface.cc b/SDL2pp/Surface.cc index ce7362c..214d92c 100644 --- a/SDL2pp/Surface.cc +++ b/SDL2pp/Surface.cc @@ -149,7 +149,7 @@ void Surface::GetColorMod(Uint8& r, Uint8& g, Uint8& b) const { } Surface& Surface::SetClipRect(const Optional& rect) { - if (SDL_SetClipRect(surface_, rect ? &*rect : nullptr) != 0) + if (SDL_SetClipRect(surface_, rect ? &*rect : nullptr) != SDL_TRUE) throw Exception("SDL_SetClipRect"); return *this; }