diff options
Diffstat (limited to 'xbmc/peripherals/addons/AddonButtonMap.cpp')
-rw-r--r-- | xbmc/peripherals/addons/AddonButtonMap.cpp | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/xbmc/peripherals/addons/AddonButtonMap.cpp b/xbmc/peripherals/addons/AddonButtonMap.cpp index 0d76ec9..f2c894c 100644 --- a/xbmc/peripherals/addons/AddonButtonMap.cpp +++ b/xbmc/peripherals/addons/AddonButtonMap.cpp @@ -10,7 +10,6 @@ #include "PeripheralAddonTranslator.h" #include "input/joysticks/JoystickUtils.h" -#include "peripherals/Peripherals.h" #include "peripherals/devices/Peripheral.h" #include "utils/log.h" @@ -25,9 +24,8 @@ using namespace PERIPHERALS; CAddonButtonMap::CAddonButtonMap(CPeripheral* device, const std::weak_ptr<CPeripheralAddon>& addon, - const std::string& strControllerId, - CPeripherals& manager) - : m_device(device), m_addon(addon), m_strControllerId(strControllerId), m_manager(manager) + const std::string& strControllerId) + : m_device(device), m_addon(addon), m_strControllerId(strControllerId) { auto peripheralAddon = m_addon.lock(); assert(peripheralAddon != nullptr); @@ -60,28 +58,6 @@ bool CAddonButtonMap::Load(void) bSuccess |= addon->GetIgnoredPrimitives(m_device, ignoredPrimitives); } - if (features.empty()) - { - // Check if we can initialize a buttonmap from the peripheral bus - PeripheralBusPtr peripheralBus = m_manager.GetBusByType(m_device->GetBusType()); - if (peripheralBus) - { - CLog::Log(LOGDEBUG, - "Buttonmap not found for {}, attempting to initialize from peripheral bus", - m_device->Location()); - if (peripheralBus->InitializeButtonMap(*m_device, *this)) - { - bSuccess = true; - - if (auto addon = m_addon.lock()) - { - addon->GetFeatures(m_device, m_strControllerId, features); - addon->GetIgnoredPrimitives(m_device, ignoredPrimitives); - } - } - } - } - // GetFeatures() was changed to always return false if no features were // retrieved. Check here, just in case its contract is changed or violated in // the future. |