mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 04:38:49 +00: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:
parent
7fe6a0b451
commit
fae12f43c2
6 changed files with 75 additions and 2 deletions
|
@ -815,6 +815,11 @@ void CFrame::StartGame(const std::string& filename)
|
|||
}
|
||||
else
|
||||
{
|
||||
#if defined(HAVE_XDG_SCREENSAVER) && HAVE_XDG_SCREENSAVER
|
||||
X11Utils::InhibitScreensaver(X11Utils::XDisplayFromHandle(GetHandle()),
|
||||
X11Utils::XWindowFromHandle(GetHandle()), true);
|
||||
#endif
|
||||
|
||||
DoFullscreen(SConfig::GetInstance().m_LocalCoreStartupParameter.bFullscreen);
|
||||
|
||||
#ifdef _WIN32
|
||||
|
@ -915,6 +920,11 @@ void CFrame::DoStop()
|
|||
|
||||
BootManager::Stop();
|
||||
|
||||
#if defined(HAVE_XDG_SCREENSAVER) && HAVE_XDG_SCREENSAVER
|
||||
X11Utils::InhibitScreensaver(X11Utils::XDisplayFromHandle(GetHandle()),
|
||||
X11Utils::XWindowFromHandle(GetHandle()), false);
|
||||
#endif
|
||||
|
||||
// Destroy the renderer frame when not rendering to main
|
||||
m_RenderParent->Disconnect(wxID_ANY, wxEVT_SIZE,
|
||||
wxSizeEventHandler(CFrame::OnRenderParentResize),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue