From a88b4fb4b83fc14835383bfe90dc88c540fd783d Mon Sep 17 00:00:00 2001 From: Garrett Brown Date: Sun, 26 Jan 2020 13:53:59 -0800 Subject: [PATCH] Fix error playing disc image games Game items ending in disc image extensions are currently played using VideoPlayer instead of RetroPlayer. This results in a brief buffering dialog before returning to the previous windows. --- system/playercorefactory.xml | 2 +- xbmc/cores/playercorefactory/PlayerSelectionRule.cpp | 3 +++ xbmc/cores/playercorefactory/PlayerSelectionRule.h | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/system/playercorefactory.xml b/system/playercorefactory.xml index be6b7219ab430..bb57a08e6c4e9 100644 --- a/system/playercorefactory.xml +++ b/system/playercorefactory.xml @@ -26,7 +26,7 @@ - + diff --git a/xbmc/cores/playercorefactory/PlayerSelectionRule.cpp b/xbmc/cores/playercorefactory/PlayerSelectionRule.cpp index 59e641638bdb6..439a69a8cfedf 100644 --- a/xbmc/cores/playercorefactory/PlayerSelectionRule.cpp +++ b/xbmc/cores/playercorefactory/PlayerSelectionRule.cpp @@ -45,6 +45,7 @@ void CPlayerSelectionRule::Initialize(TiXmlElement* pRule) m_tRemote = GetTristate(pRule->Attribute("remote")); m_tAudio = GetTristate(pRule->Attribute("audio")); m_tVideo = GetTristate(pRule->Attribute("video")); + m_tGame = GetTristate(pRule->Attribute("game")); m_tBD = GetTristate(pRule->Attribute("bd")); m_tDVD = GetTristate(pRule->Attribute("dvd")); @@ -110,6 +111,8 @@ void CPlayerSelectionRule::GetPlayers(const CFileItem& item, std::vector= 0 && (m_tVideo > 0) != item.IsVideo()) return; + if (m_tGame >= 0 && (m_tGame > 0) != item.IsGame()) + return; if (m_tInternetStream >= 0 && (m_tInternetStream > 0) != item.IsInternetStream()) return; if (m_tRemote >= 0 && (m_tRemote > 0) != item.IsRemote()) diff --git a/xbmc/cores/playercorefactory/PlayerSelectionRule.h b/xbmc/cores/playercorefactory/PlayerSelectionRule.h index bdc65927ac2d2..991631e1df6c0 100644 --- a/xbmc/cores/playercorefactory/PlayerSelectionRule.h +++ b/xbmc/cores/playercorefactory/PlayerSelectionRule.h @@ -35,6 +35,7 @@ class CPlayerSelectionRule int m_tAudio; int m_tVideo; + int m_tGame; int m_tInternetStream; int m_tRemote;