Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Temporary workaround for building on 64-bit Mac OS X
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed May 7, 2009
1 parent 48bef8c commit 38a5263
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/video/cocoa/SDL_cocoaevents.m
Expand Up @@ -20,10 +20,12 @@
slouken@libsdl.org
*/
#include "SDL_config.h"
#include "SDL_timer.h"

#include "SDL_cocoavideo.h"
#include "../../events/SDL_events_c.h"


/* setAppleMenu disappeared from the headers in 10.4 */
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
@interface NSApplication(NSAppleMenu)
Expand Down Expand Up @@ -165,6 +167,8 @@ - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sende
NSAutoreleasePool *pool;

/* 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) {
SDL_VideoData *data = (SDL_VideoData *)_this->driverdata;
Uint32 now = SDL_GetTicks();
Expand All @@ -174,6 +178,7 @@ - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sende
data->screensaver_activity = now;
}
}
#endif

pool = [[NSAutoreleasePool alloc] init];
while ([NSApp isRunning]) {
Expand Down

0 comments on commit 38a5263

Please sign in to comment.