Screensaver
Solved
General and Desktop
-
Hi,
Do you mean suspend your application when the screen saver starts ?
-
Windows
SetThreadExecutionState(ES_DISPLAY_REQUIRED); SetThreadExecutionState(ES_CONTINUOUS);
Linux
Display *display= XOpenDisplay(nullptr); if (display) { XResetScreenSaver(display); XCloseDisplay(display); }
Mac
IOPMAssertionID AssertionID; IOPMAssertionCreateWithName(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, CFSTR("PianoJokeTouch"), &AssertionID);
-