summaryrefslogtreecommitdiff
path: root/frontends/atari/misc.h
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/atari/misc.h')
-rw-r--r--frontends/atari/misc.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/frontends/atari/misc.h b/frontends/atari/misc.h
index e581c23b2..05fd1aeef 100644
--- a/frontends/atari/misc.h
+++ b/frontends/atari/misc.h
@@ -31,10 +31,12 @@
lbuf[7] = (long)sbuf[7];
#define RECT_TO_GRECT(r,g) \
- (g)->g_x = (r->x0 < r->x1) ? r->x0 : r->x1 ; \
- (g)->g_y = (r->y0 < r->y1) ? r->y0 : r->y1 ; \
- (g)->g_w = (r->x0 < r->x1) ? r->x1 - r->x0 : r->x0 - r->x1 ; \
- (g)->g_h = (r->y0 < r->y1) ? r->y1 - r->y0 : r->y0 - r->y1 ;
+ do { \
+ (g)->g_x = (r->x0 < r->x1) ? r->x0 : r->x1 ; \
+ (g)->g_y = (r->y0 < r->y1) ? r->y0 : r->y1 ; \
+ (g)->g_w = (r->x0 < r->x1) ? r->x1 - r->x0 : r->x0 - r->x1 ; \
+ (g)->g_h = (r->y0 < r->y1) ? r->y1 - r->y0 : r->y0 - r->y1 ; \
+ } while(0)