Fixed using SDL_PointInRect() from C++.
authorRyan C. Gordon <icculus@icculus.org>
Fri, 30 May 2014 09:50:47 -0400
changeset 8943 a743e8b89e72
parent 8942 3d84839c97b2
child 8944 045aac36daac
Fixed using SDL_PointInRect() from C++.
include/SDL_rect.h
--- a/include/SDL_rect.h	Fri May 30 01:51:13 2014 -0400
+++ b/include/SDL_rect.h	Fri May 30 09:50:47 2014 -0400
@@ -73,7 +73,7 @@
 SDL_FORCE_INLINE SDL_bool SDL_PointInRect(const SDL_Point *p, const SDL_Rect *r)
 {
     return ( (p->x >= r->x) && (p->x < (r->x + r->w)) &&
-             (p->y >= r->y) && (p->y < (r->y + r->h)) );
+             (p->y >= r->y) && (p->y < (r->y + r->h)) ) ? SDL_TRUE : SDL_FALSE;
 }
 
 /**