summaryrefslogtreecommitdiffstats
path: root/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h
diff options
context:
space:
mode:
Diffstat (limited to 'xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h')
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h
index 2df8a36..2067d51 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h
@@ -453,11 +453,11 @@ namespace kodi
453namespace addon 453namespace addon
454{ 454{
455 455
456 class CInstancePeripheral : public IAddonInstance 456 class ATTRIBUTE_HIDDEN CInstancePeripheral : public IAddonInstance
457 { 457 {
458 public: 458 public:
459 CInstancePeripheral() 459 CInstancePeripheral()
460 : IAddonInstance(ADDON_INSTANCE_PERIPHERAL) 460 : IAddonInstance(ADDON_INSTANCE_PERIPHERAL, GetKodiTypeVersion(ADDON_INSTANCE_PERIPHERAL))
461 { 461 {
462 if (CAddonBase::m_interface->globalSingleInstance != nullptr) 462 if (CAddonBase::m_interface->globalSingleInstance != nullptr)
463 throw std::logic_error("kodi::addon::CInstancePeripheral: Creation of more as one in single instance way is not allowed!"); 463 throw std::logic_error("kodi::addon::CInstancePeripheral: Creation of more as one in single instance way is not allowed!");
@@ -466,8 +466,10 @@ namespace addon
466 CAddonBase::m_interface->globalSingleInstance = this; 466 CAddonBase::m_interface->globalSingleInstance = this;
467 } 467 }
468 468
469 explicit CInstancePeripheral(KODI_HANDLE instance) 469 explicit CInstancePeripheral(KODI_HANDLE instance, const std::string& kodiVersion = "")
470 : IAddonInstance(ADDON_INSTANCE_PERIPHERAL) 470 : IAddonInstance(ADDON_INSTANCE_PERIPHERAL,
471 !kodiVersion.empty() ? kodiVersion
472 : GetKodiTypeVersion(ADDON_INSTANCE_PERIPHERAL))
471 { 473 {
472 if (CAddonBase::m_interface->globalSingleInstance != nullptr) 474 if (CAddonBase::m_interface->globalSingleInstance != nullptr)
473 throw std::logic_error("kodi::addon::CInstancePeripheral: Creation of multiple together with single instance way is not allowed!"); 475 throw std::logic_error("kodi::addon::CInstancePeripheral: Creation of multiple together with single instance way is not allowed!");