summaryrefslogtreecommitdiff
path: root/macosx
diff options
context:
space:
mode:
authorSND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-11-12 07:05:45 +0000
committerSND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-11-12 07:05:45 +0000
commit3732bc146db1bc8b41b5e40765510383feae594b (patch)
treea9fe74a8152fff737a6ddb626cb4ca814dc3c105 /macosx
parentea7338ddf9678665f8f59948225077d24afa3a93 (diff)
downloadpcsxr-3732bc146db1bc8b41b5e40765510383feae594b.tar.gz
Patch 10804, 10805 (MaddTheSane).
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@72189 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx')
-rw-r--r--macosx/main.m11
1 files changed, 6 insertions, 5 deletions
diff --git a/macosx/main.m b/macosx/main.m
index 7c730e0c..c27a27d2 100644
--- a/macosx/main.m
+++ b/macosx/main.m
@@ -53,7 +53,7 @@ int main(int argc, const char *argv[]) {
#ifdef USE_POWER_ASSERTION
#import <IOKit/pwr_mgt/IOPMLib.h>
-static IOPMAssertionID powerAssertion= 0;
+static IOPMAssertionID powerAssertion = kIOPMNullAssertionID;
#endif
int SysInit() {
@@ -79,7 +79,7 @@ int SysInit() {
LoadMcds(Config.Mcd1, Config.Mcd2);
#ifdef USE_POWER_ASSERTION
- IOReturn success= IOPMAssertionCreateWithName(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, CFSTR("SysInit()"), &powerAssertion);
+ IOReturn success= IOPMAssertionCreateWithName(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, CFSTR("PSX Emu Running"), &powerAssertion);
if (success != kIOReturnSuccess) {
NSLog(@"Unable to stop sleep, error code %d", success);
}
@@ -156,9 +156,9 @@ void SysUpdate() {
// Returns to the Gui
void SysRunGui() {
#ifdef USE_POWER_ASSERTION
- if (powerAssertion != 0) {
+ if (powerAssertion != kIOPMNullAssertionID) {
IOPMAssertionRelease(powerAssertion);
- powerAssertion = 0;
+ powerAssertion = kIOPMNullAssertionID;
}
#endif
}
@@ -169,8 +169,9 @@ void SysClose() {
ReleasePlugins();
#ifdef USE_POWER_ASSERTION
- if (powerAssertion != 0) {
+ if (powerAssertion != kIOPMNullAssertionID) {
IOPMAssertionRelease(powerAssertion);
+ powerAssertion = kIOPMNullAssertionID;
}
#endif