From 3fc56dbe4ad7e9deaeaef8c209a68e1de986f6fa Mon Sep 17 00:00:00 2001 From: "SND\\weimingzhi_cp" Date: Sat, 19 Feb 2011 02:25:15 +0000 Subject: -Reverted some changes to make the code build again on Tiger. -Removed x86_64 from Deployment configuration. -macosx: Use SDL for sound plugin, removed Carbon backend. -(MaddTheSane)Fixed memory leaks (Patch #8427). git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@63548 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- macosx/main.m | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'macosx/main.m') diff --git a/macosx/main.m b/macosx/main.m index f496d43c..c68505fa 100644 --- a/macosx/main.m +++ b/macosx/main.m @@ -47,8 +47,10 @@ int main(int argc, const char *argv[]) { return NSApplicationMain(argc, argv); } +#ifdef USE_POWER_ASSERTION #import static IOPMAssertionID powerAssertion= 0; +#endif int SysInit() { if (!sysInited) { @@ -72,11 +74,12 @@ int SysInit() { } LoadMcds(Config.Mcd1, Config.Mcd2); +#ifdef USE_POWER_ASSERTION IOReturn success= IOPMAssertionCreate(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, &powerAssertion); if (success != kIOReturnSuccess) { NSLog(@"Unable to stop sleep, error code %d", success); } - +#endif return 0; } @@ -145,20 +148,24 @@ void SysUpdate() { // Returns to the Gui void SysRunGui() { +#ifdef USE_POWER_ASSERTION if (powerAssertion != 0) { IOPMAssertionRelease(powerAssertion); powerAssertion = 0; } +#endif } // Close mem and plugins void SysClose() { EmuShutdown(); ReleasePlugins(); - + +#ifdef USE_POWER_ASSERTION if (powerAssertion != 0) { IOPMAssertionRelease(powerAssertion); } +#endif if (emuLog != NULL) fclose(emuLog); -- cgit v1.2.3