mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 00:59:44 -06:00
Inhibit the screensaver while the emulator is running on linux. Fixes issue 3279. Uses the xdg-screensaver method suggested in that issue.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6477 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -141,6 +141,10 @@ void X11_MainLoop()
|
||||
Window win = (Window)Core::GetWindowHandle();
|
||||
XSelectInput(dpy, win, KeyPressMask | FocusChangeMask);
|
||||
|
||||
#if defined(HAVE_XDG_SCREENSAVER) && HAVE_XDG_SCREENSAVER
|
||||
X11Utils::InhibitScreensaver(dpy, win, true);
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
||||
X11Utils::XRRConfiguration *XRRConfig = new X11Utils::XRRConfiguration(dpy, win);
|
||||
#endif
|
||||
@ -251,6 +255,11 @@ void X11_MainLoop()
|
||||
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
||||
delete XRRConfig;
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_XDG_SCREENSAVER) && HAVE_XDG_SCREENSAVER
|
||||
X11Utils::InhibitScreensaver(dpy, win, false);
|
||||
#endif
|
||||
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
|
||||
XFreeCursor(dpy, blankCursor);
|
||||
XCloseDisplay(dpy);
|
||||
|
Reference in New Issue
Block a user