Commit 44a9cf98 authored by Ryan C. Gordon's avatar Ryan C. Gordon

Merged r4866:4867 from branches/SDL-1.2: 64-bit Mac OS X 10.5 SDK fix.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404375
parent f30bac45
...@@ -25,6 +25,15 @@ ...@@ -25,6 +25,15 @@
#include "SDL_cocoavideo.h" #include "SDL_cocoavideo.h"
#include "../../events/SDL_events_c.h" #include "../../events/SDL_events_c.h"
#if !defined(UsrActivity) && defined(__LP64__) && !defined(__POWER__)
/*
* Workaround for a bug in the 10.5 SDK: By accident, OSService.h does
* not include Power.h at all when compiling in 64bit mode. This has
* been fixed in 10.6, but for 10.5, we manually define UsrActivity
* to ensure compilation works.
*/
#define UsrActivity 1
#endif
/* setAppleMenu disappeared from the headers in 10.4 */ /* setAppleMenu disappeared from the headers in 10.4 */
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
...@@ -167,8 +176,6 @@ Cocoa_PumpEvents(_THIS) ...@@ -167,8 +176,6 @@ Cocoa_PumpEvents(_THIS)
NSAutoreleasePool *pool; NSAutoreleasePool *pool;
/* Update activity every 30 seconds to prevent screensaver */ /* Update activity every 30 seconds to prevent screensaver */
/* FIXME: This define isn't available with 64-bit Mac OS X? */
#ifdef UsrActivity
if (_this->suspend_screensaver) { if (_this->suspend_screensaver) {
SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; SDL_VideoData *data = (SDL_VideoData *)_this->driverdata;
Uint32 now = SDL_GetTicks(); Uint32 now = SDL_GetTicks();
...@@ -178,7 +185,6 @@ Cocoa_PumpEvents(_THIS) ...@@ -178,7 +185,6 @@ Cocoa_PumpEvents(_THIS)
data->screensaver_activity = now; data->screensaver_activity = now;
} }
} }
#endif
pool = [[NSAutoreleasePool alloc] init]; pool = [[NSAutoreleasePool alloc] init];
while ([NSApp isRunning]) { while ([NSApp isRunning]) {
......
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