Patched to compile on Mac OS X (not that you should necessarily be using this SDL-1.2
authorRyan C. Gordon <icculus@icculus.org>
Sun, 03 Jun 2007 06:52:58 +0000
branchSDL-1.2
changeset 39470f8a812e2855
parent 3946 259aaca0fb0c
child 3948 ab8297bf3768
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
     1.1 --- a/src/video/maccommon/SDL_macevents.c	Sun Jun 03 06:52:06 2007 +0000
     1.2 +++ b/src/video/maccommon/SDL_macevents.c	Sun Jun 03 06:52:58 2007 +0000
     1.3 @@ -159,6 +159,8 @@
     1.4  	/* Check the current state of the keyboard */
     1.5  	if ( SDL_GetAppState() & SDL_APPINPUTFOCUS ) {
     1.6  		KeyMap keys;
     1.7 +		const Uint8 *keysptr = (Uint8 *) &keys;
     1.8 +		const Uint8 *last_keysptr = (Uint8 *) &last_keys;
     1.9  
    1.10  		/* Check for special non-event keys */
    1.11  		if ( event.modifiers != last_mods ) {
    1.12 @@ -214,8 +216,10 @@
    1.13  		   is immediately followed by a keyup event.
    1.14  		*/
    1.15  		GetKeys(keys);
    1.16 -		if ( (keys[0] != last_keys[0]) || (keys[1] != last_keys[1]) ||
    1.17 -		     (keys[2] != last_keys[2]) || (keys[3] != last_keys[3]) ) {
    1.18 +		if ( (keysptr[0] != last_keysptr[0]) ||
    1.19 +		     (keysptr[1] != last_keysptr[1]) ||
    1.20 +		     (keysptr[2] != last_keysptr[2]) ||
    1.21 +		     (keysptr[3] != last_keysptr[3]) ) {
    1.22  			SDL_keysym keysym;
    1.23  			int old_bit, new_bit;
    1.24  
    1.25 @@ -730,7 +734,7 @@
    1.26  
    1.27  #if !TARGET_API_MAC_CARBON
    1.28  /* Since we don't initialize QuickDraw, we need to get a pointer to qd */
    1.29 -QDGlobals *theQD = NULL;
    1.30 +struct QDGlobals *theQD = NULL;
    1.31  #endif
    1.32  
    1.33  /* Exported to the macmain code */