mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 17:43:02 +00:00
x11: Only call out to xdg-screensaver when D-Bus failed
This commit is contained in:
parent
a061b4a801
commit
5afdd35e54
@ -182,10 +182,12 @@ static void dbus_screensaver_uninhibit(void)
|
|||||||
dbus_screensaver_cookie = 0;
|
dbus_screensaver_cookie = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void x11_suspend_screensaver_dbus(bool enable)
|
/* Returns false when fallback should be attempted */
|
||||||
|
bool x11_suspend_screensaver_dbus(bool enable)
|
||||||
{
|
{
|
||||||
if (enable) dbus_screensaver_inhibit();
|
if (enable) return dbus_screensaver_inhibit();
|
||||||
if (!enable) dbus_screensaver_uninhibit();
|
dbus_screensaver_uninhibit();
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -346,10 +348,11 @@ void x11_suspend_screensaver_xdg_screensaver(Window wnd, bool enable)
|
|||||||
|
|
||||||
void x11_suspend_screensaver(Window wnd, bool enable)
|
void x11_suspend_screensaver(Window wnd, bool enable)
|
||||||
{
|
{
|
||||||
x11_suspend_screensaver_xdg_screensaver(wnd, enable);
|
|
||||||
#ifdef HAVE_DBUS
|
#ifdef HAVE_DBUS
|
||||||
x11_suspend_screensaver_dbus(enable);
|
/* Fall-through */
|
||||||
|
if (!x11_suspend_screensaver_dbus(enable))
|
||||||
#endif
|
#endif
|
||||||
|
x11_suspend_screensaver_xdg_screensaver(wnd, enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool get_video_mode(Display *dpy, unsigned width, unsigned height,
|
static bool get_video_mode(Display *dpy, unsigned width, unsigned height,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user