aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett Brown <themagnificentmrb@gmail.com>2018-03-28 10:00:00 +0200
committerGarrett Brown <themagnificentmrb@gmail.com>2018-04-02 14:43:31 -0700
commitbc4ab984f915cda000eea09ecc4c3819f8818a42 (patch)
tree616add48a3612b852c989637e0ec0f5331a4b89c
parentf5a7a5b24848e6e30b721cc910417fed955c7949 (diff)
Improve logic in CApplication::ActivateScreenSaver()
-rw-r--r--xbmc/Application.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
index 87ef85b413..25c075db53 100644
--- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp
@@ -3855,10 +3855,20 @@ void CApplication::ActivateScreenSaver(bool forceType /*= false */)
// disable screensaver lock from the login screen
m_iScreenSaveLock = CServiceBroker::GetGUI()->GetWindowManager().GetActiveWindow() == WINDOW_LOGIN_SCREEN ? 1 : 0;
+
// set to Dim in the case of a dialog on screen or playing video
- if (!forceType && (CServiceBroker::GetGUI()->GetWindowManager().HasModalDialog() ||
- (m_appPlayer.IsPlayingVideo() && m_ServiceManager->GetSettings().GetBool(CSettings::SETTING_SCREENSAVER_USEDIMONPAUSE)) ||
- CServiceBroker::GetPVRManager().GUIActions()->IsRunningChannelScan()))
+ bool bUseDim = false;
+ if (!forceType)
+ {
+ if (CServiceBroker::GetGUI()->GetWindowManager().HasModalDialog())
+ bUseDim = true;
+ else if (m_appPlayer.IsPlayingVideo() && m_ServiceManager->GetSettings().GetBool(CSettings::SETTING_SCREENSAVER_USEDIMONPAUSE))
+ bUseDim = true;
+ else if (CServiceBroker::GetPVRManager().GUIActions()->IsRunningChannelScan())
+ bUseDim = true;
+ }
+
+ if (bUseDim)
m_screensaverIdInUse = "screensaver.xbmc.builtin.dim";
else // Get Screensaver Mode
m_screensaverIdInUse = m_ServiceManager->GetSettings().GetString(CSettings::SETTING_SCREENSAVER_MODE);