mirror of
https://github.com/clementine-player/Clementine
synced 2025-02-01 11:56:45 +01:00
Fix compiling on Snow Leopard.
This commit is contained in:
parent
0bfdbce64f
commit
7fc733fca1
@ -19,13 +19,22 @@
|
||||
|
||||
#include <QtDebug>
|
||||
|
||||
#include "core/utilities.h"
|
||||
|
||||
// kIOPMAssertionTypePreventUserIdleDisplaySleep from Lion.
|
||||
#define kLionDisplayAssertion CFSTR("PreventUserIdleDisplaySleep")
|
||||
|
||||
MacScreensaver::MacScreensaver()
|
||||
: assertion_id_(0) {
|
||||
}
|
||||
|
||||
void MacScreensaver::Inhibit() {
|
||||
CFStringRef assertion_type = (Utilities::GetMacVersion() >= 7)
|
||||
? kLionDisplayAssertion
|
||||
: kIOPMAssertionTypeNoDisplaySleep;
|
||||
|
||||
IOPMAssertionCreateWithName(
|
||||
kIOPMAssertionTypePreventUserIdleDisplaySleep,
|
||||
assertion_type,
|
||||
kIOPMAssertionLevelOn,
|
||||
CFSTR("Showing full-screen Clementine visualisations"),
|
||||
&assertion_id_);
|
||||
|
Loading…
x
Reference in New Issue
Block a user