X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fcross.cc;h=dcd4ddfd884b695ee2af4360605f4952702b2fce;hb=4cb18d1e0b8fdedf6bb38e1d4187a2d782957022;hp=1b83bad7c6dca9a02cf9696eccf8c8834f0fa8b7;hpb=dfd42d2a546d14c32057a34002543877ea2f99cb;p=dcpomatic.git diff --git a/src/lib/cross.cc b/src/lib/cross.cc index 1b83bad7c..dcd4ddfd8 100644 --- a/src/lib/cross.cc +++ b/src/lib/cross.cc @@ -337,6 +337,7 @@ void Waker::nudge () { #ifdef DCPOMATIC_WINDOWS + boost::mutex::scoped_lock lm (_mutex); SetThreadExecutionState (ES_SYSTEM_REQUIRED); #endif } @@ -344,6 +345,7 @@ Waker::nudge () Waker::Waker () { #ifdef DCPOMATIC_OSX + boost::mutex::scoped_lock lm (_mutex); /* We should use this */ // IOPMAssertionCreateWithName (kIOPMAssertionTypeNoIdleSleep, kIOPMAssertionLevelOn, CFSTR ("Encoding DCP"), &_assertion_id); /* but it's not available on 10.5, so we use this */ @@ -354,6 +356,7 @@ Waker::Waker () Waker::~Waker () { #ifdef DCPOMATIC_OSX + boost::mutex::scoped_lock lm (_mutex); IOPMAssertionRelease (_assertion_id); #endif }