mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
DolphinQt: Don't call UICommon::InhibitScreenSaver if already in desired state.
This commit is contained in:
@ -1434,6 +1434,11 @@ void MainWindow::UpdateScreenSaverInhibition()
|
||||
const bool inhibit =
|
||||
Config::Get(Config::MAIN_DISABLE_SCREENSAVER) && (Core::GetState() == Core::State::Running);
|
||||
|
||||
if (inhibit == m_is_screensaver_inhibited)
|
||||
return;
|
||||
|
||||
m_is_screensaver_inhibited = inhibit;
|
||||
|
||||
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
||||
if (GetWindowSystemType() == WindowSystemType::X11)
|
||||
UICommon::InhibitScreenSaver(winId(), inhibit);
|
||||
|
Reference in New Issue
Block a user