diff --git a/src/sdl/rect.cpp b/src/sdl/rect.cpp index e185a7d9b66e..4e1c437434f2 100644 --- a/src/sdl/rect.cpp +++ b/src/sdl/rect.cpp @@ -22,7 +22,17 @@ bool point_in_rect(int x, int y, const SDL_Rect& rect) { SDL_Point p {x, y}; + /* This check is here because Travis CI builds with SDL 2.0.2. + * The code isn't intended to be skipped: end users, distribution packagers etc. + * should build the game with SDL 2.0.4 or above. + * + * - vultraz, 2017-06-18 + */ +#if SDL_VERSION_ATLEAST(2, 0, 4) return SDL_PointInRect(&p, &rect); +#else + return false; +#endif } bool point_in_rect(const gui2::point& point, const SDL_Rect& rect)