diff options
Diffstat (limited to 'src/lib/cross_osx.cc')
| -rw-r--r-- | src/lib/cross_osx.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/cross_osx.cc b/src/lib/cross_osx.cc index cda6a643f..acb51283d 100644 --- a/src/lib/cross_osx.cc +++ b/src/lib/cross_osx.cc @@ -156,10 +156,16 @@ Waker::nudge() Waker::Waker(Reason reason) - : _reason(reason) { boost::mutex::scoped_lock lm(_mutex); - IOPMAssertionCreateWithName(kIOPMAssertionTypeNoIdleSleep, kIOPMAssertionLevelOn, CFSTR("Encoding DCP"), &_assertion_id); + switch (reason) { + case Reason::ENCODING: + IOPMAssertionCreateWithName(kIOPMAssertionTypeNoIdleSleep, kIOPMAssertionLevelOn, CFSTR("Encoding DCP"), &_assertion_id); + break; + case Reason::PLAYING: + IOPMAssertionCreateWithName(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, CFSTR("Playing DCP"), &_assertion_id); + break; + } } |
