From a6995849d255650ef82d443e24b5c1576871f548 Mon Sep 17 00:00:00 2001 From: Ole Loots Date: Tue, 16 Apr 2013 21:57:27 +0200 Subject: Check rc_intersect result and added comments. --- atari/gemtk/guiwin.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'atari/gemtk/guiwin.c') diff --git a/atari/gemtk/guiwin.c b/atari/gemtk/guiwin.c index 6275184be..8d3da4b1a 100644 --- a/atari/gemtk/guiwin.c +++ b/atari/gemtk/guiwin.c @@ -26,8 +26,8 @@ #include "gemtk.h" -#define DEBUG_PRINT(x) printf x -//#define DEBUG_PRINT(x) +//#define DEBUG_PRINT(x) printf x +#define DEBUG_PRINT(x) struct gemtk_window_s { @@ -102,7 +102,9 @@ static void move_rect(GUIWIN * win, GRECT *rect, int dx, int dy) /* get intersection with screen area */ wind_get_grect(0, WF_CURRXYWH, &g); - rc_intersect(&g, rect); + if(!rc_intersect(&g, rect)){ + return; + } xy[0] = rect->g_x; xy[1] = rect->g_y; xy[2] = xy[0] + rect->g_w-1; -- cgit v1.2.3