diff options
author | Matus Kral <matuskral@me.com> | 2016-04-03 08:19:50 +0200 |
---|---|---|
committer | Thomas Amland <thomas.amland@gmail.com> | 2016-04-23 15:52:15 +0200 |
commit | 93dcfc0c0c58aed4ed15eaa8fd7ff5d4aa588a2e (patch) | |
tree | 988c4d8551411c0c87465b3214df3fc6d51c2c45 | |
parent | 6a7719fcfdbf6b86acf03f0426cd99dd5ad10624 (diff) |
m_bNeedsPolling broken for busses where it is set outside constructor
-rw-r--r-- | xbmc/peripherals/Peripherals.cpp | 3 | ||||
-rw-r--r-- | xbmc/peripherals/bus/PeripheralBus.cpp | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/xbmc/peripherals/Peripherals.cpp b/xbmc/peripherals/Peripherals.cpp index 3a27fdca08..51cd664749 100644 --- a/xbmc/peripherals/Peripherals.cpp +++ b/xbmc/peripherals/Peripherals.cpp @@ -115,10 +115,7 @@ void CPeripherals::Initialise() /* initialise all known busses and run an initial scan for devices */ for (auto& bus : m_busses) - { bus->Initialise(); - bus->TriggerDeviceScan(); - } } m_eventScanner.Start(); diff --git a/xbmc/peripherals/bus/PeripheralBus.cpp b/xbmc/peripherals/bus/PeripheralBus.cpp index 2c38f75d6f..b58696b873 100644 --- a/xbmc/peripherals/bus/PeripheralBus.cpp +++ b/xbmc/peripherals/bus/PeripheralBus.cpp @@ -219,6 +219,13 @@ void CPeripheralBus::Process(void) if (!ScanForDevices()) break; + // depending on bus implementation + // needsPolling can be set properly + // only after unitial scan. + // if this is the case, bail out. + if (!m_bNeedsPolling) + break; + if (!m_bStop) m_triggerEvent.WaitMSec(m_iRescanTime); } |