diff options
author | Kai Sommerfeld <kai.sommerfeld@gmx.com> | 2018-03-14 11:44:48 +0100 |
---|---|---|
committer | Kai Sommerfeld <kai.sommerfeld@gmx.com> | 2018-03-15 15:50:39 +0100 |
commit | 33e75dcf6608b18abc7cbcfc833ce2f1ba8904a6 (patch) | |
tree | d386c04b98ebbe3aff59e0eb8e36c270656bc8f3 | |
parent | 079baffd886b009f8e5846632f1e84f10f7587d6 (diff) |
[PVR] PVRGUIChannelNavigator: Optimize to only call CGUIInfoManager::SetCurrentItem if the channel to play/preview actually has changed.
-rw-r--r-- | xbmc/pvr/PVRGUIChannelNavigator.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/xbmc/pvr/PVRGUIChannelNavigator.cpp b/xbmc/pvr/PVRGUIChannelNavigator.cpp index a08eaf966c..fbd8cdd403 100644 --- a/xbmc/pvr/PVRGUIChannelNavigator.cpp +++ b/xbmc/pvr/PVRGUIChannelNavigator.cpp @@ -179,10 +179,12 @@ namespace PVR m_iChannelInfoJobId = -1; } - m_currentChannel = m_playingChannel; - - if (m_currentChannel) - item.reset(new CFileItem(m_playingChannel)); + if (m_currentChannel != m_playingChannel) + { + m_currentChannel = m_playingChannel; + if (m_playingChannel) + item.reset(new CFileItem(m_playingChannel)); + } } if (item) @@ -206,9 +208,12 @@ namespace PVR CSingleLock lock(m_critSection); m_playingChannel = channel; - m_currentChannel = m_playingChannel; - - item.reset(new CFileItem(m_playingChannel)); + if (m_currentChannel != m_playingChannel) + { + m_currentChannel = m_playingChannel; + if (m_playingChannel) + item.reset(new CFileItem(m_playingChannel)); + } } if (item) |