Skip to content

Commit

Permalink
Attempt to fix travis build
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Jun 18, 2017
1 parent 1af8a2f commit f5f2b65
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/sdl/rect.cpp
Expand Up @@ -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)
Expand Down

0 comments on commit f5f2b65

Please sign in to comment.