diff options
| author | manuel <manuel@mausz.at> | 2020-07-02 23:09:26 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2020-07-02 23:09:26 +0200 |
| commit | 5f8335c1e49ce108ef3481863833c98efa00411b (patch) | |
| tree | f02b5c1c9765bb6a14c8eb42bb4f81b9face0b55 /xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h | |
| parent | e317daf081a1048904fdf0b548946fa3ba6593a7 (diff) | |
| download | kodi-pvr-build-5f8335c1e49ce108ef3481863833c98efa00411b.tar.gz kodi-pvr-build-5f8335c1e49ce108ef3481863833c98efa00411b.tar.bz2 kodi-pvr-build-5f8335c1e49ce108ef3481863833c98efa00411b.zip | |
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.h | 10 |
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 | |||
| 453 | namespace addon | 453 | namespace 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!"); |
