diff options
author | Kai Sommerfeld <kai.sommerfeld@gmx.com> | 2016-01-09 17:29:17 +0100 |
---|---|---|
committer | Kai Sommerfeld <kai.sommerfeld@gmx.com> | 2016-01-09 17:29:17 +0100 |
commit | 6b061c66d505a73c206bb2305ed8e4829cb451b2 (patch) | |
tree | f3df9a05d15e0157bad41ad7d46f9ddd54956259 | |
parent | 0544094673c015228ecf31e35f5e7c62e61c3a1a (diff) | |
parent | a9e0f5e897610c208287e8d4cc5cf4af551169b5 (diff) |
Merge pull request #8815 from ksooo/jarvis-fix-channelswitchdelay
[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; |