Commit 24f42ead authored by Ryan C. Gordon's avatar Ryan C. Gordon

Patched to compile on Mac OS X (not that you should necessarily be using this

 on Mac OS X, but still) ...

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402324
parent e883b665
...@@ -159,6 +159,8 @@ static int Mac_HandleEvents(_THIS, int wait4it) ...@@ -159,6 +159,8 @@ static int Mac_HandleEvents(_THIS, int wait4it)
/* Check the current state of the keyboard */ /* Check the current state of the keyboard */
if ( SDL_GetAppState() & SDL_APPINPUTFOCUS ) { if ( SDL_GetAppState() & SDL_APPINPUTFOCUS ) {
KeyMap keys; KeyMap keys;
const Uint8 *keysptr = (Uint8 *) &keys;
const Uint8 *last_keysptr = (Uint8 *) &last_keys;
/* Check for special non-event keys */ /* Check for special non-event keys */
if ( event.modifiers != last_mods ) { if ( event.modifiers != last_mods ) {
...@@ -214,8 +216,10 @@ static int Mac_HandleEvents(_THIS, int wait4it) ...@@ -214,8 +216,10 @@ static int Mac_HandleEvents(_THIS, int wait4it)
is immediately followed by a keyup event. is immediately followed by a keyup event.
*/ */
GetKeys(keys); GetKeys(keys);
if ( (keys[0] != last_keys[0]) || (keys[1] != last_keys[1]) || if ( (keysptr[0] != last_keysptr[0]) ||
(keys[2] != last_keys[2]) || (keys[3] != last_keys[3]) ) { (keysptr[1] != last_keysptr[1]) ||
(keysptr[2] != last_keysptr[2]) ||
(keysptr[3] != last_keysptr[3]) ) {
SDL_keysym keysym; SDL_keysym keysym;
int old_bit, new_bit; int old_bit, new_bit;
...@@ -730,7 +734,7 @@ static void Mac_DoAppleMenu(_THIS, long choice) ...@@ -730,7 +734,7 @@ static void Mac_DoAppleMenu(_THIS, long choice)
#if !TARGET_API_MAC_CARBON #if !TARGET_API_MAC_CARBON
/* Since we don't initialize QuickDraw, we need to get a pointer to qd */ /* Since we don't initialize QuickDraw, we need to get a pointer to qd */
QDGlobals *theQD = NULL; struct QDGlobals *theQD = NULL;
#endif #endif
/* Exported to the macmain code */ /* Exported to the macmain code */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment