mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
linux: Use D-Bus to inhibit screensaver
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user