From 96f65b754e25ab34420a939f68717a95cbc0f178 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 3 Jun 2007 06:52:58 +0000 Subject: [PATCH] Patched to compile on Mac OS X (not that you should necessarily be using this on Mac OS X, but still) ... --- src/video/maccommon/SDL_macevents.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/video/maccommon/SDL_macevents.c b/src/video/maccommon/SDL_macevents.c index 0e4f813e2..4c5bce3f8 100644 --- a/src/video/maccommon/SDL_macevents.c +++ b/src/video/maccommon/SDL_macevents.c @@ -159,6 +159,8 @@ static int Mac_HandleEvents(_THIS, int wait4it) /* Check the current state of the keyboard */ if ( SDL_GetAppState() & SDL_APPINPUTFOCUS ) { KeyMap keys; + const Uint8 *keysptr = (Uint8 *) &keys; + const Uint8 *last_keysptr = (Uint8 *) &last_keys; /* Check for special non-event keys */ if ( event.modifiers != last_mods ) { @@ -214,8 +216,10 @@ static int Mac_HandleEvents(_THIS, int wait4it) is immediately followed by a keyup event. */ GetKeys(keys); - if ( (keys[0] != last_keys[0]) || (keys[1] != last_keys[1]) || - (keys[2] != last_keys[2]) || (keys[3] != last_keys[3]) ) { + if ( (keysptr[0] != last_keysptr[0]) || + (keysptr[1] != last_keysptr[1]) || + (keysptr[2] != last_keysptr[2]) || + (keysptr[3] != last_keysptr[3]) ) { SDL_keysym keysym; int old_bit, new_bit; @@ -730,7 +734,7 @@ static void Mac_DoAppleMenu(_THIS, long choice) #if !TARGET_API_MAC_CARBON /* Since we don't initialize QuickDraw, we need to get a pointer to qd */ -QDGlobals *theQD = NULL; +struct QDGlobals *theQD = NULL; #endif /* Exported to the macmain code */