diff src/video/maccommon/SDL_macevents.c @ 3947:0f8a812e2855 SDL-1.2

Patched to compile on Mac OS X (not that you should necessarily be using this on Mac OS X, but still) ...
author Ryan C. Gordon <icculus@icculus.org>
date Sun, 03 Jun 2007 06:52:58 +0000
parents f12379c41042
children 86746036a6d6
line wrap: on
line diff
--- a/src/video/maccommon/SDL_macevents.c	Sun Jun 03 06:52:06 2007 +0000
+++ b/src/video/maccommon/SDL_macevents.c	Sun Jun 03 06:52:58 2007 +0000
@@ -159,6 +159,8 @@
 	/* 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 @@
 		   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 @@
 
 #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 */