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:44:11 -0700
commit43403f0cc8c4d611f7bf53e563641abcfb89d268 (patch)
tree26ca8f6435d4b7a49eb5c6bc614912b638c086c4
parent3fc19e5635c45c8719db11e34620dfe4a41f9b88 (diff)
Improve logic in CGraphicContext::SetFullScreenVideo()howto-cleanup-logic
-rw-r--r--xbmc/guilib/GraphicContext.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/xbmc/guilib/GraphicContext.cpp b/xbmc/guilib/GraphicContext.cpp
index 39b51ec9b3..880eeedcba 100644
--- a/xbmc/guilib/GraphicContext.cpp
+++ b/xbmc/guilib/GraphicContext.cpp
@@ -360,8 +360,20 @@ void CGraphicContext::SetFullScreenVideo(bool bOnOff)
if (m_bFullScreenRoot)
{
- bool allowDesktopRes = CServiceBroker::GetSettings().GetInt(CSettings::SETTING_VIDEOPLAYER_ADJUSTREFRESHRATE) == ADJUST_REFRESHRATE_ALWAYS;
- if (m_bFullScreenVideo || (!allowDesktopRes && g_application.GetAppPlayer().IsPlayingVideo()))
+ bool bTriggerUpdateRes = false;
+ if (m_bFullScreenVideo)
+ bTriggerUpdateRes = true;
+ else
+ {
+ bool allowDesktopRes = CServiceBroker::GetSettings().GetInt(CSettings::SETTING_VIDEOPLAYER_ADJUSTREFRESHRATE) == ADJUST_REFRESHRATE_ALWAYS;
+ if (!allowDesktopRes)
+ {
+ if (g_application.GetAppPlayer().IsPlayingVideo())
+ bTriggerUpdateRes = true;
+ }
+ }
+
+ if (bTriggerUpdateRes)
g_application.GetAppPlayer().TriggerUpdateResolution();
else if (CDisplaySettings::GetInstance().GetCurrentResolution() > RES_DESKTOP)
SetVideoResolution(CDisplaySettings::GetInstance().GetCurrentResolution(), false);