diff options
author | Kai Sommerfeld <kai.sommerfeld@gmx.com> | 2016-01-06 12:15:24 +0100 |
---|---|---|
committer | Kai Sommerfeld <kai.sommerfeld@gmx.com> | 2016-01-08 22:41:29 +0100 |
commit | a9e0f5e897610c208287e8d4cc5cf4af551169b5 (patch) | |
tree | 2efcfcf85fc3545c9e91f900a4337cf28f7251f4 | |
parent | efbb55d3cef24da8c73891407121493f1f1962f6 (diff) |
[PVR] Fix ACTION_CHANNEL_[UP|DOWN] & ACTION_[NEXT|PREV]_ITEM to respect channel switch delay settings.
-rw-r--r-- | xbmc/GUIInfoManager.cpp | 7 | ||||
-rw-r--r-- | xbmc/GUIInfoManager.h | 1 | ||||
-rw-r--r-- | xbmc/cores/dvdplayer/DVDPlayer.cpp | 27 |
3 files changed, 14 insertions, 21 deletions
diff --git a/xbmc/GUIInfoManager.cpp b/xbmc/GUIInfoManager.cpp index 458ab86b87..65e0a69c0e 100644 --- a/xbmc/GUIInfoManager.cpp +++ b/xbmc/GUIInfoManager.cpp @@ -6315,13 +6315,6 @@ bool CGUIInfoManager::ConditionsChangedValues(const std::map<INFO::InfoPtr, bool return false; } -bool CGUIInfoManager::IsPlayerOSDActive() const -{ - return m_playerShowInfo && - (g_windowManager.IsWindowActive(WINDOW_DIALOG_VIDEO_OSD) || - g_windowManager.IsWindowActive(WINDOW_DIALOG_MUSIC_OSD)); -} - bool CGUIInfoManager::IsPlayerChannelPreviewActive() const { return m_playerShowInfo && diff --git a/xbmc/GUIInfoManager.h b/xbmc/GUIInfoManager.h index 8bd814c1ad..28005da720 100644 --- a/xbmc/GUIInfoManager.h +++ b/xbmc/GUIInfoManager.h @@ -193,7 +193,6 @@ public: bool GetShowInfo() const { return m_playerShowInfo; } void ToggleShowCodec() { m_playerShowCodec = !m_playerShowCodec; }; bool ToggleShowInfo() { m_playerShowInfo = !m_playerShowInfo; return m_playerShowInfo; }; - bool IsPlayerOSDActive() const; bool IsPlayerChannelPreviewActive() const; std::string GetSystemHeatInfo(int info); diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp index e27633977f..9c0b5cc3b0 100644 --- a/xbmc/cores/dvdplayer/DVDPlayer.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp @@ -2654,9 +2654,9 @@ void CDVDPlayer::HandleMessages() if (input) { bool bSwitchSuccessful(false); - bool bShowPreview(!g_infoManager.IsPlayerOSDActive() && - (pMsg->IsType(CDVDMsg::PLAYER_CHANNEL_PREVIEW_NEXT) || - pMsg->IsType(CDVDMsg::PLAYER_CHANNEL_PREVIEW_PREV))); + bool bShowPreview(pMsg->IsType(CDVDMsg::PLAYER_CHANNEL_PREVIEW_NEXT) || + pMsg->IsType(CDVDMsg::PLAYER_CHANNEL_PREVIEW_PREV) || + CSettings::GetInstance().GetInt(CSettings::SETTING_PVRPLAYBACK_CHANNELENTRYTIMEOUT) > 0); if (!bShowPreview) { @@ -2675,8 +2675,7 @@ void CDVDPlayer::HandleMessages() { UpdateApplication(0); - if (!g_infoManager.IsPlayerOSDActive() && - CSettings::GetInstance().GetBool(CSettings::SETTING_PVRPLAYBACK_CONFIRMCHANNELSWITCH)) + if (pMsg->IsType(CDVDMsg::PLAYER_CHANNEL_PREVIEW_NEXT) || pMsg->IsType(CDVDMsg::PLAYER_CHANNEL_PREVIEW_PREV)) m_ChannelEntryTimeOut.SetInfinite(); else m_ChannelEntryTimeOut.Set(CSettings::GetInstance().GetInt(CSettings::SETTING_PVRPLAYBACK_CHANNELENTRYTIMEOUT)); @@ -4199,16 +4198,17 @@ bool CDVDPlayer::OnAction(const CAction &action) case ACTION_CHANNEL_UP: { bool bPreview(action.GetID() == ACTION_MOVE_UP && // only up/down shows a preview, all others do switch - (CSettings::GetInstance().GetBool(CSettings::SETTING_PVRPLAYBACK_CONFIRMCHANNELSWITCH) || - CSettings::GetInstance().GetInt(CSettings::SETTING_PVRPLAYBACK_CHANNELENTRYTIMEOUT) > 0)); + CSettings::GetInstance().GetBool(CSettings::SETTING_PVRPLAYBACK_CONFIRMCHANNELSWITCH)); if (bPreview) m_messenger.Put(new CDVDMsg(CDVDMsg::PLAYER_CHANNEL_PREVIEW_NEXT)); else + { m_messenger.Put(new CDVDMsg(CDVDMsg::PLAYER_CHANNEL_NEXT)); - if (!bPreview || g_infoManager.IsPlayerOSDActive()) - g_infoManager.SetDisplayAfterSeek(); + if (CSettings::GetInstance().GetInt(CSettings::SETTING_PVRPLAYBACK_CHANNELENTRYTIMEOUT) == 0) + g_infoManager.SetDisplayAfterSeek(); + } ShowPVRChannelInfo(); return true; @@ -4219,16 +4219,17 @@ bool CDVDPlayer::OnAction(const CAction &action) case ACTION_CHANNEL_DOWN: { bool bPreview(action.GetID() == ACTION_MOVE_DOWN && // only up/down shows a preview, all others do switch - (CSettings::GetInstance().GetBool(CSettings::SETTING_PVRPLAYBACK_CONFIRMCHANNELSWITCH) || - CSettings::GetInstance().GetInt(CSettings::SETTING_PVRPLAYBACK_CHANNELENTRYTIMEOUT) > 0)); + CSettings::GetInstance().GetBool(CSettings::SETTING_PVRPLAYBACK_CONFIRMCHANNELSWITCH)); if (bPreview) m_messenger.Put(new CDVDMsg(CDVDMsg::PLAYER_CHANNEL_PREVIEW_PREV)); else + { m_messenger.Put(new CDVDMsg(CDVDMsg::PLAYER_CHANNEL_PREV)); - if (!bPreview || g_infoManager.IsPlayerOSDActive()) - g_infoManager.SetDisplayAfterSeek(); + if (CSettings::GetInstance().GetInt(CSettings::SETTING_PVRPLAYBACK_CHANNELENTRYTIMEOUT) == 0) + g_infoManager.SetDisplayAfterSeek(); + } ShowPVRChannelInfo(); return true; |