mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 12:19:12 +00:00
linux: Use D-Bus to inhibit screensaver
This commit is contained in:
parent
4bc1546596
commit
2748771cb3
9 changed files with 229 additions and 41 deletions
|
@ -50,8 +50,8 @@
|
|||
#include "UICommon/DiscordPresence.h"
|
||||
#include "UICommon/USBUtils.h"
|
||||
|
||||
#ifdef HAVE_X11
|
||||
#include "UICommon/X11Utils.h"
|
||||
#ifdef HAVE_QTDBUS
|
||||
#include "UICommon/DBusUtils.h"
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
@ -480,17 +480,13 @@ bool TriggerSTMPowerEvent()
|
|||
return true;
|
||||
}
|
||||
|
||||
#ifdef HAVE_X11
|
||||
void InhibitScreenSaver(Window win, bool inhibit)
|
||||
#else
|
||||
void InhibitScreenSaver(bool inhibit)
|
||||
#endif
|
||||
{
|
||||
// Inhibit the screensaver. Depending on the operating system this may also
|
||||
// disable low-power states and/or screen dimming.
|
||||
|
||||
#ifdef HAVE_X11
|
||||
X11Utils::InhibitScreensaver(win, inhibit);
|
||||
#ifdef HAVE_QTDBUS
|
||||
DBusUtils::InhibitScreenSaver(inhibit);
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue