diff -Nru kodi-peripheral-joystick-1.4.7/appveyor.yml kodi-peripheral-joystick-1.4.8/appveyor.yml --- kodi-peripheral-joystick-1.4.7/appveyor.yml 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/appveyor.yml 2013-05-31 22:59:22.000000000 +0000 @@ -28,7 +28,7 @@ - call "%VS140COMNTOOLS%..\..\VC\bin\vcvars32.bat" - set cur_dir=%cd% - cd .. - - git clone --depth=1 https://github.com/xbmc/xbmc.git + - git clone --branch Leia --depth=1 https://github.com/xbmc/xbmc.git - cd %app_id% - mkdir build - cd build diff -Nru kodi-peripheral-joystick-1.4.7/CMakeLists.txt kodi-peripheral-joystick-1.4.8/CMakeLists.txt --- kodi-peripheral-joystick-1.4.7/CMakeLists.txt 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/CMakeLists.txt 2013-05-31 22:59:22.000000000 +0000 @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.5) project(peripheral.joystick) list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) @@ -8,13 +8,11 @@ # --- Add-on Dependencies ------------------------------------------------------ find_package(Kodi REQUIRED) -find_package(p8-platform REQUIRED) find_package(TinyXML REQUIRED) include_directories(${INCLUDES} ${PROJECT_SOURCE_DIR}/src ${KODI_INCLUDE_DIR}/.. # Hack way with "/..", need bigger Kodi cmake rework to match right include ways (becomes done in future) - ${p8-platform_INCLUDE_DIRS} ${TINYXML_INCLUDE_DIRS}) set(JOYSTICK_SOURCES src/addon.cpp @@ -109,7 +107,6 @@ src/storage/xml/DeviceXml.h src/storage/xml/JoystickFamiliesXml.h src/storage/xml/JoystickFamilyDefinitions.h - src/utils/CommonIncludes.h src/utils/CommonMacros.h src/utils/StringUtils.h) @@ -125,7 +122,7 @@ list(APPEND JOYSTICK_HEADERS src/log/LogSyslog.h) endif() -list(APPEND DEPLIBS ${p8-platform_LIBRARIES} ${TINYXML_LIBRARIES}) +list(APPEND DEPLIBS ${TINYXML_LIBRARIES}) # --- SDL2 --------------------------------------------------------------------- diff -Nru kodi-peripheral-joystick-1.4.7/debian/changelog kodi-peripheral-joystick-1.4.8/debian/changelog --- kodi-peripheral-joystick-1.4.7/debian/changelog 2019-03-31 16:33:10.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/debian/changelog 2013-05-31 22:59:22.000000000 +0000 @@ -1,9 +1,7 @@ -kodi-peripheral-joystick (1.4.7-1~disco) disco; urgency=low +kodi-peripheral-joystick (1.4.8-1~disco) disco; urgency=low [ kodi ] * autogenerated dummy changelog - [ wsnipex ] - * no upstream changelog available + -- Team Kodi Sat, 01 Jun 2013 00:59:22 +0200 - -- wsnipex Sun, 31 Mar 2019 18:33:10 +0200 diff -Nru kodi-peripheral-joystick-1.4.7/debian/changelog.tmp kodi-peripheral-joystick-1.4.8/debian/changelog.tmp --- kodi-peripheral-joystick-1.4.7/debian/changelog.tmp 2019-03-31 16:33:00.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/debian/changelog.tmp 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -kodi-peripheral-joystick (1.4.7-1~#DIST#) #DIST#; urgency=low - - [ kodi ] - * autogenerated dummy changelog - - -- Team Kodi Sat, 01 Jun 2013 00:59:22 +0200 - diff -Nru kodi-peripheral-joystick-1.4.7/debian/control kodi-peripheral-joystick-1.4.8/debian/control --- kodi-peripheral-joystick-1.4.7/debian/control 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/debian/control 2013-05-31 22:59:22.000000000 +0000 @@ -2,7 +2,7 @@ Priority: extra Maintainer: wsnipex Build-Depends: debhelper (>= 9.0.0), cmake (>= 3.1), libtinyxml-dev, - kodi-addon-dev, pkg-config, libp8-platform-dev, libudev-dev + kodi-addon-dev, pkg-config, libudev-dev Standards-Version: 3.9.6 Section: libs diff -Nru kodi-peripheral-joystick-1.4.7/debian/kodi-peripheral-joystick.install kodi-peripheral-joystick-1.4.8/debian/kodi-peripheral-joystick.install --- kodi-peripheral-joystick-1.4.7/debian/kodi-peripheral-joystick.install 2019-03-31 16:33:00.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/debian/kodi-peripheral-joystick.install 2013-05-31 22:59:22.000000000 +0000 @@ -1,2 +1,2 @@ -usr/lib -usr/share +usr/lib/*/kodi/addons +usr/share/kodi/addons diff -Nru kodi-peripheral-joystick-1.4.7/Jenkinsfile kodi-peripheral-joystick-1.4.8/Jenkinsfile --- kodi-peripheral-joystick-1.4.7/Jenkinsfile 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/Jenkinsfile 2013-05-31 22:59:22.000000000 +0000 @@ -1 +1 @@ -buildPlugin(deploy: ['ubuntu-ppa']) +buildPlugin(version: "Leia", deploy: ['ubuntu-ppa']) diff -Nru kodi-peripheral-joystick-1.4.7/peripheral.joystick/addon.xml.in kodi-peripheral-joystick-1.4.8/peripheral.joystick/addon.xml.in --- kodi-peripheral-joystick-1.4.7/peripheral.joystick/addon.xml.in 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/peripheral.joystick/addon.xml.in 2013-05-31 22:59:22.000000000 +0000 @@ -1,7 +1,7 @@ @ADDON_DEPENDS@ diff -Nru kodi-peripheral-joystick-1.4.7/peripheral.joystick/resources/buttonmaps/xml/linux/Logitech_Inc._WingMan_RumblePad_9b_7a.xml kodi-peripheral-joystick-1.4.8/peripheral.joystick/resources/buttonmaps/xml/linux/Logitech_Inc._WingMan_RumblePad_9b_7a.xml --- kodi-peripheral-joystick-1.4.7/peripheral.joystick/resources/buttonmaps/xml/linux/Logitech_Inc._WingMan_RumblePad_9b_7a.xml 1970-01-01 00:00:00.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/peripheral.joystick/resources/buttonmaps/xml/linux/Logitech_Inc._WingMan_RumblePad_9b_7a.xml 2013-05-31 22:59:22.000000000 +0000 @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru kodi-peripheral-joystick-1.4.7/Readme.md kodi-peripheral-joystick-1.4.8/Readme.md --- kodi-peripheral-joystick-1.4.7/Readme.md 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/Readme.md 2013-05-31 22:59:22.000000000 +0000 @@ -70,39 +70,12 @@ ### Developing on Linux -The add-on requires several dependencies to build properly. Like Kodi's build system, you can perform a system install or a local one (demonstrated here). - -First, clone p8-platform and build per standard CMake: - -```shell -git clone https://github.com/Pulse-Eight/platform.git -cd platform -mkdir build -cd build -cmake -DCMAKE_BUILD_TYPE=Debug \ - -DCMAKE_INSTALL_PREFIX=$HOME/kodi \ - .. -make -make install -``` - -The kodi-platform library was split from p8-platform. Do the same as above for this library: - -``` -git clone https://github.com/xbmc/kodi-platform.git -cd kodi-platform -... -``` - -With these dependencies in place, the add-on can be built: - ```shell git clone https://github.com/xbmc/peripheral.joystick.git cd peripheral.joystick mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Debug \ - -DCMAKE_PREFIX_PATH=$HOME/kodi \ -DCMAKE_INSTALL_PREFIX=$HOME/workspace/kodi/addons \ -DPACKAGE_ZIP=1 \ .. diff -Nru kodi-peripheral-joystick-1.4.7/src/addon.cpp kodi-peripheral-joystick-1.4.8/src/addon.cpp --- kodi-peripheral-joystick-1.4.7/src/addon.cpp 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/src/addon.cpp 2013-05-31 22:59:22.000000000 +0000 @@ -30,7 +30,6 @@ #include "log/LogAddon.h" #include "settings/Settings.h" #include "storage/StorageManager.h" -#include "utils/CommonIncludes.h" #include "utils/CommonMacros.h" #include diff -Nru kodi-peripheral-joystick-1.4.7/src/api/cocoa/JoystickCocoa.cpp kodi-peripheral-joystick-1.4.8/src/api/cocoa/JoystickCocoa.cpp --- kodi-peripheral-joystick-1.4.7/src/api/cocoa/JoystickCocoa.cpp 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/src/api/cocoa/JoystickCocoa.cpp 2013-05-31 22:59:22.000000000 +0000 @@ -25,7 +25,6 @@ #include using namespace JOYSTICK; -using namespace P8PLATFORM; #define MAX_JOYSTICK_BUTTONS 512 @@ -57,7 +56,7 @@ bool CJoystickCocoa::Initialize(void) { - CLockObject lock(m_mutex); + std::lock_guard lock(m_mutex); if (!m_bInitialized) { @@ -133,7 +132,7 @@ void CJoystickCocoa::Deinitialize(void) { - CLockObject lock(m_mutex); + std::lock_guard lock(m_mutex); CJoystick::Deinitialize(); @@ -145,31 +144,31 @@ bool CJoystickCocoa::GetEvents(std::vector& events) { - CLockObject lock(m_mutex); + std::lock_guard lock(m_mutex); return CJoystick::GetEvents(events); } bool CJoystickCocoa::ScanEvents(void) { - CLockObject lock(m_mutex); + std::lock_guard lock(m_mutex); return m_bInitialized; // Events arrive asynchronously } void CJoystickCocoa::SetButtonValue(unsigned int buttonIndex, JOYSTICK_STATE_BUTTON buttonValue) { - CLockObject lock(m_mutex); + std::lock_guard lock(m_mutex); CJoystick::SetButtonValue(buttonIndex, buttonValue); } void CJoystickCocoa::SetHatValue(unsigned int hatIndex, JOYSTICK_STATE_HAT hatValue) { - CLockObject lock(m_mutex); + std::lock_guard lock(m_mutex); CJoystick::SetHatValue(hatIndex, hatValue); } void CJoystickCocoa::SetAxisValue(unsigned int axisIndex, JOYSTICK_STATE_AXIS axisValue) { - CLockObject lock(m_mutex); + std::lock_guard lock(m_mutex); CJoystick::SetAxisValue(axisIndex, axisValue); } diff -Nru kodi-peripheral-joystick-1.4.7/src/api/cocoa/JoystickCocoa.h kodi-peripheral-joystick-1.4.8/src/api/cocoa/JoystickCocoa.h --- kodi-peripheral-joystick-1.4.7/src/api/cocoa/JoystickCocoa.h 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/src/api/cocoa/JoystickCocoa.h 2013-05-31 22:59:22.000000000 +0000 @@ -26,8 +26,7 @@ #include #include #include - -#include "p8-platform/threads/mutex.h" +#include namespace JOYSTICK { @@ -69,6 +68,6 @@ CJoystickInterfaceCocoa* const m_api; std::vector m_buttons; std::vector m_axes; - P8PLATFORM::CMutex m_mutex; + std::recursive_mutex m_mutex; }; } diff -Nru kodi-peripheral-joystick-1.4.7/src/api/cocoa/JoystickInterfaceCocoa.cpp kodi-peripheral-joystick-1.4.8/src/api/cocoa/JoystickInterfaceCocoa.cpp --- kodi-peripheral-joystick-1.4.7/src/api/cocoa/JoystickInterfaceCocoa.cpp 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/src/api/cocoa/JoystickInterfaceCocoa.cpp 2013-05-31 22:59:22.000000000 +0000 @@ -26,7 +26,6 @@ #include using namespace JOYSTICK; -using namespace P8PLATFORM; // --- MatchingDictionary ------------------------------------------------------ @@ -140,7 +139,7 @@ bool CJoystickInterfaceCocoa::ScanForJoysticks(JoystickVector& joysticks) { - CLockObject lock(m_deviceDiscoveryMutex); + std::lock_guard lock(m_deviceDiscoveryMutex); for (auto it = m_discoveredDevices.begin(); it != m_discoveredDevices.end(); ++it) joysticks.push_back(JoystickPtr(new CJoystickCocoa(*it, this))); @@ -153,7 +152,7 @@ bool bDeviceAdded = false; { - CLockObject lock(m_deviceDiscoveryMutex); + std::lock_guard lock(m_deviceDiscoveryMutex); if (std::find(m_discoveredDevices.begin(), m_discoveredDevices.end(), device) == m_discoveredDevices.end()) { @@ -172,7 +171,7 @@ void CJoystickInterfaceCocoa::DeviceRemoved(IOHIDDeviceRef device) { { - CLockObject lock(m_deviceDiscoveryMutex); + std::lock_guard lock(m_deviceDiscoveryMutex); m_discoveredDevices.erase(std::remove(m_discoveredDevices.begin(), m_discoveredDevices.end(), device), m_discoveredDevices.end()); } @@ -185,7 +184,7 @@ IOHIDElementRef element = IOHIDValueGetElement(newValue); IOHIDDeviceRef device = IOHIDElementGetDevice(element); - CLockObject lock(m_deviceInputMutex); + std::lock_guard lock(m_deviceInputMutex); for (std::vector::iterator it = m_registeredDevices.begin(); it != m_registeredDevices.end(); ++it) { @@ -196,14 +195,14 @@ void CJoystickInterfaceCocoa::RegisterInputCallback(ICocoaInputCallback* callback, IOHIDDeviceRef device) { - CLockObject lock(m_deviceInputMutex); + std::lock_guard lock(m_deviceInputMutex); m_registeredDevices.push_back(std::make_pair(device, callback)); } void CJoystickInterfaceCocoa::UnregisterInputCallback(ICocoaInputCallback* callback) { - CLockObject lock(m_deviceInputMutex); + std::lock_guard lock(m_deviceInputMutex); for (std::vector::iterator it = m_registeredDevices.begin(); it != m_registeredDevices.end(); ) { diff -Nru kodi-peripheral-joystick-1.4.7/src/api/cocoa/JoystickInterfaceCocoa.h kodi-peripheral-joystick-1.4.8/src/api/cocoa/JoystickInterfaceCocoa.h --- kodi-peripheral-joystick-1.4.7/src/api/cocoa/JoystickInterfaceCocoa.h 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/src/api/cocoa/JoystickInterfaceCocoa.h 2013-05-31 22:59:22.000000000 +0000 @@ -21,13 +21,11 @@ #include "api/IJoystickInterface.h" -#include "p8-platform/threads/mutex.h" - #include #include #include #include - +#include #include #include @@ -84,7 +82,7 @@ std::vector m_discoveredDevices; std::vector m_registeredDevices; - P8PLATFORM::CMutex m_deviceDiscoveryMutex; - P8PLATFORM::CMutex m_deviceInputMutex; + std::recursive_mutex m_deviceDiscoveryMutex; + std::recursive_mutex m_deviceInputMutex; }; } diff -Nru kodi-peripheral-joystick-1.4.7/src/api/directinput/JoystickDirectInput.h kodi-peripheral-joystick-1.4.8/src/api/directinput/JoystickDirectInput.h --- kodi-peripheral-joystick-1.4.7/src/api/directinput/JoystickDirectInput.h 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/src/api/directinput/JoystickDirectInput.h 2013-05-31 22:59:22.000000000 +0000 @@ -19,8 +19,6 @@ */ #pragma once -#include "utils/CommonIncludes.h" - #include "api/Joystick.h" #define DIRECTINPUT_VERSION 0x0800 diff -Nru kodi-peripheral-joystick-1.4.7/src/api/directinput/JoystickInterfaceDirectInput.cpp kodi-peripheral-joystick-1.4.8/src/api/directinput/JoystickInterfaceDirectInput.cpp --- kodi-peripheral-joystick-1.4.7/src/api/directinput/JoystickInterfaceDirectInput.cpp 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/src/api/directinput/JoystickInterfaceDirectInput.cpp 2013-05-31 22:59:22.000000000 +0000 @@ -18,8 +18,6 @@ * */ -#include "utils/CommonIncludes.h" - #include "JoystickInterfaceDirectInput.h" #include "JoystickDirectInput.h" #include "api/JoystickTypes.h" diff -Nru kodi-peripheral-joystick-1.4.7/src/api/Joystick.cpp kodi-peripheral-joystick-1.4.8/src/api/Joystick.cpp --- kodi-peripheral-joystick-1.4.7/src/api/Joystick.cpp 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/src/api/Joystick.cpp 2013-05-31 22:59:22.000000000 +0000 @@ -27,17 +27,11 @@ #include "utils/CommonMacros.h" #include "utils/StringUtils.h" -#include "p8-platform/util/timeutils.h" - using namespace JOYSTICK; #define ANALOG_EPSILON 0.0001f CJoystick::CJoystick(EJoystickInterface interfaceType) - : m_discoverTimeMs(P8PLATFORM::GetTimeMs()), - m_activateTimeMs(-1), - m_firstEventTimeMs(-1), - m_lastEventTimeMs(-1) { SetProvider(JoystickTranslator::GetInterfaceProvider(interfaceType)); } @@ -104,8 +98,6 @@ GetHatEvents(events); GetAxisEvents(events); - UpdateTimers(); - return true; } @@ -134,7 +126,7 @@ { if (!IsActive()) { - m_activateTimeMs = P8PLATFORM::GetTimeMs(); + m_isActive = true; if (CJoystickUtils::IsGhostJoystick(*this)) { @@ -219,15 +211,3 @@ else SetAxisValue(axisIndex, 0.0f); } - -void CJoystick::UpdateTimers(void) -{ - if (m_firstEventTimeMs < 0) - m_firstEventTimeMs = P8PLATFORM::GetTimeMs(); - m_lastEventTimeMs = P8PLATFORM::GetTimeMs(); -} - -float CJoystick::NormalizeAxis(long value, long maxAxisAmount) -{ - return 1.0f * CONSTRAIN(-maxAxisAmount, value, maxAxisAmount) / maxAxisAmount; -} diff -Nru kodi-peripheral-joystick-1.4.7/src/api/Joystick.h kodi-peripheral-joystick-1.4.8/src/api/Joystick.h --- kodi-peripheral-joystick-1.4.7/src/api/Joystick.h 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/src/api/Joystick.h 2013-05-31 22:59:22.000000000 +0000 @@ -46,29 +46,9 @@ void SetName(const std::string& strName); /*! - * The time that this joystick was discovered - */ - int64_t DiscoverTimeMs(void) const { return m_discoverTimeMs; } - - /*! - * The time that this joystick received its first input - */ - int64_t ActivateTimeMs(void) const { return m_activateTimeMs; } - - /*! * Check if this joystick has received any input */ - bool IsActive(void) const { return m_activateTimeMs >= 0; } - - /*! - * The time that this joystick delivered its first event - */ - int64_t FirstEventTimeMs(void) const { return m_firstEventTimeMs; } - - /*! - * The most recent time that this joystick delivered an event - */ - int64_t LastEventTimeMs(void) const { return m_lastEventTimeMs; } + bool IsActive(void) const { return m_isActive; } /*! * Initialize the joystick object. Joystick will be initialized before the @@ -122,14 +102,6 @@ void GetHatEvents(std::vector& events); void GetAxisEvents(std::vector& events); - void UpdateTimers(void); - - /*! - * Normalize the axis to the closed interval [-1.0, 1.0]. - */ - static float NormalizeAxis(long value, long maxAxisAmount); - static float ScaleDeadzone(float value); - struct JoystickAxis { JOYSTICK_STATE_AXIS state = 0.0f; @@ -145,9 +117,6 @@ JoystickState m_state; JoystickState m_stateBuffer; - int64_t m_discoverTimeMs; - int64_t m_activateTimeMs; - int64_t m_firstEventTimeMs; - int64_t m_lastEventTimeMs; + bool m_isActive = false; }; } diff -Nru kodi-peripheral-joystick-1.4.7/src/api/JoystickManager.cpp kodi-peripheral-joystick-1.4.8/src/api/JoystickManager.cpp --- kodi-peripheral-joystick-1.4.7/src/api/JoystickManager.cpp 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/src/api/JoystickManager.cpp 2013-05-31 22:59:22.000000000 +0000 @@ -51,7 +51,6 @@ #include using namespace JOYSTICK; -using namespace P8PLATFORM; // --- Utility functions ------------------------------------------------------- @@ -169,7 +168,7 @@ bool CJoystickManager::Initialize(IScannerCallback* scanner) { - CLockObject lock(m_interfacesMutex); + std::lock_guard lock(m_interfacesMutex); m_scanner = scanner; @@ -191,12 +190,12 @@ void CJoystickManager::Deinitialize(void) { { - CLockObject lock(m_joystickMutex); + std::lock_guard lock(m_joystickMutex); m_joysticks.clear(); } { - CLockObject lock(m_interfacesMutex); + std::lock_guard lock(m_interfacesMutex); for (auto pInterface : m_interfaces) SetEnabled(pInterface->Type(), false); safe_delete_vector(m_interfaces); @@ -207,7 +206,7 @@ bool CJoystickManager::SupportsRumble(void) const { - CLockObject lock(m_interfacesMutex); + std::lock_guard lock(m_interfacesMutex); for (auto pInterface : m_enabledInterfaces) { if (pInterface->SupportsRumble()) @@ -219,7 +218,7 @@ bool CJoystickManager::SupportsPowerOff(void) const { - CLockObject lock(m_interfacesMutex); + std::lock_guard lock(m_interfacesMutex); for (auto pInterface : m_enabledInterfaces) { if (pInterface->SupportsPowerOff()) @@ -231,7 +230,7 @@ bool CJoystickManager::HasInterface(EJoystickInterface iface) const { - CLockObject lock(m_interfacesMutex); + std::lock_guard lock(m_interfacesMutex); for (auto pInterface : m_interfaces) { if (pInterface->Type() == iface) @@ -243,7 +242,7 @@ void CJoystickManager::SetEnabled(EJoystickInterface iface, bool bEnabled) { - CLockObject lock(m_interfacesMutex); + std::lock_guard lock(m_interfacesMutex); for (auto pInterface : m_interfaces) { @@ -274,7 +273,7 @@ bool CJoystickManager::IsEnabled(IJoystickInterface* iface) { - CLockObject lock(m_interfacesMutex); + std::lock_guard lock(m_interfacesMutex); return m_enabledInterfaces.find(iface) != m_enabledInterfaces.end(); } @@ -282,13 +281,13 @@ { JoystickVector scanResults; { - CLockObject lock(m_interfacesMutex); + std::lock_guard lock(m_interfacesMutex); // Scan for joysticks (this can take a while, don't block) for (auto pInterface : m_enabledInterfaces) pInterface->ScanForJoysticks(scanResults); } - CLockObject lock(m_joystickMutex); + std::lock_guard lock(m_joystickMutex); // Unregister removed joysticks for (int i = (int)m_joysticks.size() - 1; i >= 0; i--) @@ -330,7 +329,7 @@ JoystickPtr CJoystickManager::GetJoystick(unsigned int index) const { - CLockObject lock(m_joystickMutex); + std::lock_guard lock(m_joystickMutex); for (JoystickVector::const_iterator it = m_joysticks.begin(); it != m_joysticks.end(); ++it) { @@ -345,7 +344,7 @@ { JoystickVector result; - CLockObject lock(m_joystickMutex); + std::lock_guard lock(m_joystickMutex); for (const auto& joystick : m_joysticks) { @@ -361,7 +360,7 @@ bool CJoystickManager::GetEvents(std::vector& events) { - CLockObject lock(m_joystickMutex); + std::lock_guard lock(m_joystickMutex); for (JoystickVector::iterator it = m_joysticks.begin(); it != m_joysticks.end(); ++it) (*it)->GetEvents(events); @@ -373,7 +372,7 @@ { bool bHandled = false; - CLockObject lock(m_joystickMutex); + std::lock_guard lock(m_joystickMutex); for (const JoystickPtr& joystick : m_joysticks) { @@ -390,7 +389,7 @@ void CJoystickManager::ProcessEvents() { - CLockObject lock(m_joystickMutex); + std::lock_guard lock(m_joystickMutex); for (const JoystickPtr& joystick : m_joysticks) joystick->ProcessEvents(); @@ -398,7 +397,7 @@ void CJoystickManager::SetChanged(bool bChanged) { - CLockObject lock(m_changedMutex); + std::lock_guard lock(m_changedMutex); m_bChanged = bChanged; } @@ -406,7 +405,7 @@ { bool bChanged; { - CLockObject lock(m_changedMutex); + std::lock_guard lock(m_changedMutex); bChanged = m_bChanged; m_bChanged = false; } @@ -419,7 +418,7 @@ { static ButtonMap empty; - CLockObject lock(m_interfacesMutex); + std::lock_guard lock(m_interfacesMutex); for (auto pInterface : m_interfaces) { diff -Nru kodi-peripheral-joystick-1.4.7/src/api/JoystickManager.h kodi-peripheral-joystick-1.4.8/src/api/JoystickManager.h --- kodi-peripheral-joystick-1.4.7/src/api/JoystickManager.h 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/src/api/JoystickManager.h 2013-05-31 22:59:22.000000000 +0000 @@ -23,8 +23,8 @@ #include "buttonmapper/ButtonMapTypes.h" #include -#include "p8-platform/threads/mutex.h" +#include #include #include @@ -162,8 +162,8 @@ JoystickVector m_joysticks; unsigned int m_nextJoystickIndex; bool m_bChanged; - mutable P8PLATFORM::CMutex m_changedMutex; - mutable P8PLATFORM::CMutex m_interfacesMutex; - mutable P8PLATFORM::CMutex m_joystickMutex; + mutable std::recursive_mutex m_changedMutex; + mutable std::recursive_mutex m_interfacesMutex; + mutable std::recursive_mutex m_joystickMutex; }; } diff -Nru kodi-peripheral-joystick-1.4.7/src/api/linux/JoystickInterfaceLinux.cpp kodi-peripheral-joystick-1.4.8/src/api/linux/JoystickInterfaceLinux.cpp --- kodi-peripheral-joystick-1.4.7/src/api/linux/JoystickInterfaceLinux.cpp 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/src/api/linux/JoystickInterfaceLinux.cpp 2013-05-31 22:59:22.000000000 +0000 @@ -33,6 +33,7 @@ #include #include #include +#include using namespace JOYSTICK; diff -Nru kodi-peripheral-joystick-1.4.7/src/api/linux/JoystickLinux.cpp kodi-peripheral-joystick-1.4.8/src/api/linux/JoystickLinux.cpp --- kodi-peripheral-joystick-1.4.7/src/api/linux/JoystickLinux.cpp 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/src/api/linux/JoystickLinux.cpp 2013-05-31 22:59:22.000000000 +0000 @@ -34,6 +34,7 @@ #include #include #include +#include using namespace JOYSTICK; diff -Nru kodi-peripheral-joystick-1.4.7/src/api/udev/JoystickUdev.cpp kodi-peripheral-joystick-1.4.8/src/api/udev/JoystickUdev.cpp --- kodi-peripheral-joystick-1.4.7/src/api/udev/JoystickUdev.cpp 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/src/api/udev/JoystickUdev.cpp 2013-05-31 22:59:22.000000000 +0000 @@ -101,13 +101,12 @@ void CJoystickUdev::ProcessEvents(void) { - using namespace P8PLATFORM; std::array motors; std::array previousMotors; { - CLockObject lock(m_mutex); + std::lock_guard lock(m_mutex); motors = m_motors; previousMotors = m_previousMotors; } @@ -143,7 +142,7 @@ } { - CLockObject lock(m_mutex); + std::lock_guard lock(m_mutex); m_previousMotors = motors; } } @@ -346,7 +345,6 @@ bool CJoystickUdev::SetMotor(unsigned int motorIndex, float magnitude) { - using namespace P8PLATFORM; if (!m_bInitialized) return false; @@ -359,7 +357,7 @@ uint16_t strength = std::min(0xffff, static_cast(magnitude * 0xffff)); - CLockObject lock(m_mutex); + std::lock_guard lock(m_mutex); m_motors[motorIndex] = strength; diff -Nru kodi-peripheral-joystick-1.4.7/src/api/udev/JoystickUdev.h kodi-peripheral-joystick-1.4.8/src/api/udev/JoystickUdev.h --- kodi-peripheral-joystick-1.4.7/src/api/udev/JoystickUdev.h 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/src/api/udev/JoystickUdev.h 2013-05-31 22:59:22.000000000 +0000 @@ -41,11 +41,10 @@ #include "api/Joystick.h" -#include "p8-platform/threads/mutex.h" - #include #include #include +#include #include struct udev_device; @@ -102,6 +101,6 @@ std::map m_axes_bind; // Maps keycodes -> axis and axis info std::array m_motors; std::array m_previousMotors; - P8PLATFORM::CMutex m_mutex; + std::recursive_mutex m_mutex; }; } diff -Nru kodi-peripheral-joystick-1.4.7/src/api/xinput/XInputDLL.cpp kodi-peripheral-joystick-1.4.8/src/api/xinput/XInputDLL.cpp --- kodi-peripheral-joystick-1.4.7/src/api/xinput/XInputDLL.cpp 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/src/api/xinput/XInputDLL.cpp 2013-05-31 22:59:22.000000000 +0000 @@ -22,7 +22,6 @@ #include "log/Log.h" using namespace JOYSTICK; -using namespace P8PLATFORM; CXInputDLL::CXInputDLL(void) : m_dll(NULL), @@ -43,7 +42,7 @@ bool CXInputDLL::Load(void) { - CLockObject lock(m_mutex); + std::lock_guard lock(m_mutex); m_strVersion = "1.4"; #if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY != WINAPI_FAMILY_APP) @@ -107,7 +106,7 @@ void CXInputDLL::Unload(void) { - CLockObject lock(m_mutex); + std::lock_guard lock(m_mutex); #if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY != WINAPI_FAMILY_APP) if (m_dll) @@ -136,7 +135,7 @@ bool CXInputDLL::GetState(unsigned int controllerId, XINPUT_STATE& state) { - CLockObject lock(m_mutex); + std::lock_guard lock(m_mutex); if (!m_getState) return false; @@ -154,7 +153,7 @@ bool CXInputDLL::GetStateWithGuide(unsigned int controllerId, XINPUT_STATE_EX& state) { - CLockObject lock(m_mutex); + std::lock_guard lock(m_mutex); if (!m_getStateEx) return false; @@ -172,7 +171,7 @@ bool CXInputDLL::SetState(unsigned int controllerId, XINPUT_VIBRATION& vibration) { - CLockObject lock(m_mutex); + std::lock_guard lock(m_mutex); if (!m_setState) return false; @@ -192,7 +191,7 @@ bool CXInputDLL::GetCapabilities(unsigned int controllerId, XINPUT_CAPABILITIES& caps) { - CLockObject lock(m_mutex); + std::lock_guard lock(m_mutex); if (!m_getCaps) return false; @@ -213,7 +212,7 @@ bool CXInputDLL::GetBatteryInformation(unsigned int controllerId, BatteryDeviceType deviceType, XINPUT_BATTERY_INFORMATION& battery) { - CLockObject lock(m_mutex); + std::lock_guard lock(m_mutex); if (!m_getBatteryInfo) return false; @@ -249,7 +248,7 @@ bool CXInputDLL::PowerOff(unsigned int controllerId) { - CLockObject lock(m_mutex); + std::lock_guard lock(m_mutex); if (!m_powerOff) return false; diff -Nru kodi-peripheral-joystick-1.4.7/src/api/xinput/XInputDLL.h kodi-peripheral-joystick-1.4.8/src/api/xinput/XInputDLL.h --- kodi-peripheral-joystick-1.4.7/src/api/xinput/XInputDLL.h 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/src/api/xinput/XInputDLL.h 2013-05-31 22:59:22.000000000 +0000 @@ -19,10 +19,7 @@ */ #pragma once -#include "utils/CommonIncludes.h" - -#include "p8-platform/threads/mutex.h" - +#include #include #include #include @@ -113,6 +110,6 @@ FnXInputGetCapabilities m_getCaps; FnXInputGetBatteryInformation m_getBatteryInfo; FnXInputPowerOffController m_powerOff; - P8PLATFORM::CMutex m_mutex; + std::recursive_mutex m_mutex; }; } diff -Nru kodi-peripheral-joystick-1.4.7/src/filesystem/DirectoryCache.cpp kodi-peripheral-joystick-1.4.8/src/filesystem/DirectoryCache.cpp --- kodi-peripheral-joystick-1.4.7/src/filesystem/DirectoryCache.cpp 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/src/filesystem/DirectoryCache.cpp 2013-05-31 22:59:22.000000000 +0000 @@ -20,13 +20,12 @@ #include "DirectoryCache.h" -#include "p8-platform/util/timeutils.h" - #include +#include using namespace JOYSTICK; -#define DIRECTORY_LIFETIME_MS 2000 // 2 seconds +static constexpr std::chrono::seconds DIRECTORY_LIFETIME = std::chrono::seconds(2); // --- Helper function --------------------------------------------------------- @@ -63,10 +62,10 @@ const ItemListRecord& record = itItemList->second; // Check timestamp for stale data - const int64_t timestamp = record.first; - const int64_t expires = timestamp + DIRECTORY_LIFETIME_MS; + const std::chrono::steady_clock::time_point timestamp = record.first; + const std::chrono::steady_clock::time_point expires = timestamp + DIRECTORY_LIFETIME; - if (expires <= P8PLATFORM::GetTimeMs()) + if (expires <= std::chrono::steady_clock::now()) { items = record.second; return true; @@ -83,7 +82,7 @@ ItemListRecord& record = m_cache[path]; - int64_t& timestamp = record.first; + std::chrono::steady_clock::time_point& timestamp = record.first; ItemList& cachedItems = record.second; // Remove missing items @@ -106,6 +105,6 @@ } } - timestamp = P8PLATFORM::GetTimeMs(); + timestamp = std::chrono::steady_clock::now(); cachedItems = items; } diff -Nru kodi-peripheral-joystick-1.4.7/src/filesystem/DirectoryCache.h kodi-peripheral-joystick-1.4.8/src/filesystem/DirectoryCache.h --- kodi-peripheral-joystick-1.4.7/src/filesystem/DirectoryCache.h 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/src/filesystem/DirectoryCache.h 2013-05-31 22:59:22.000000000 +0000 @@ -21,6 +21,7 @@ #include +#include #include #include #include @@ -50,7 +51,7 @@ IDirectoryCacheCallback* m_callbacks; typedef std::vector ItemList; - typedef std::pair ItemListRecord; + typedef std::pair ItemListRecord; typedef std::map ItemMap; ItemMap m_cache; diff -Nru kodi-peripheral-joystick-1.4.7/src/filesystem/DirectoryUtils.cpp kodi-peripheral-joystick-1.4.8/src/filesystem/DirectoryUtils.cpp --- kodi-peripheral-joystick-1.4.7/src/filesystem/DirectoryUtils.cpp 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/src/filesystem/DirectoryUtils.cpp 2013-05-31 22:59:22.000000000 +0000 @@ -20,7 +20,6 @@ #include "DirectoryUtils.h" #include "filesystem/vfs/VFSDirectoryUtils.h" -#include "utils/CommonIncludes.h" // for libXBMC_addon.h using namespace JOYSTICK; diff -Nru kodi-peripheral-joystick-1.4.7/src/filesystem/FileUtils.cpp kodi-peripheral-joystick-1.4.8/src/filesystem/FileUtils.cpp --- kodi-peripheral-joystick-1.4.7/src/filesystem/FileUtils.cpp 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/src/filesystem/FileUtils.cpp 2013-05-31 22:59:22.000000000 +0000 @@ -20,7 +20,6 @@ #include "FileUtils.h" #include "filesystem/vfs/VFSFileUtils.h" -#include "utils/CommonIncludes.h" // for libXBMC_addon.h using namespace JOYSTICK; diff -Nru kodi-peripheral-joystick-1.4.7/src/log/LogAddon.cpp kodi-peripheral-joystick-1.4.8/src/log/LogAddon.cpp --- kodi-peripheral-joystick-1.4.7/src/log/LogAddon.cpp 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/src/log/LogAddon.cpp 2013-05-31 22:59:22.000000000 +0000 @@ -20,9 +20,10 @@ */ #include "LogAddon.h" -#include "utils/CommonIncludes.h" // for libXBMC_addon.h #include "utils/CommonMacros.h" +#include + using namespace JOYSTICK; CLogAddon::CLogAddon() diff -Nru kodi-peripheral-joystick-1.4.7/src/log/LogConsole.cpp kodi-peripheral-joystick-1.4.8/src/log/LogConsole.cpp --- kodi-peripheral-joystick-1.4.7/src/log/LogConsole.cpp 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/src/log/LogConsole.cpp 2013-05-31 22:59:22.000000000 +0000 @@ -24,13 +24,12 @@ #include using namespace JOYSTICK; -using namespace P8PLATFORM; void CLogConsole::Log(SYS_LOG_LEVEL level, const char* logline) { // TODO: Prepend current date - CLockObject lock(m_mutex); + std::lock_guard lock(m_mutex); printf("%s\n", logline); } diff -Nru kodi-peripheral-joystick-1.4.7/src/log/LogConsole.h kodi-peripheral-joystick-1.4.8/src/log/LogConsole.h --- kodi-peripheral-joystick-1.4.7/src/log/LogConsole.h 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/src/log/LogConsole.h 2013-05-31 22:59:22.000000000 +0000 @@ -22,7 +22,7 @@ #include "ILog.h" -#include "p8-platform/threads/mutex.h" +#include namespace JOYSTICK { @@ -35,6 +35,6 @@ virtual SYS_LOG_TYPE Type(void) const override { return SYS_LOG_TYPE_CONSOLE; } private: - P8PLATFORM::CMutex m_mutex; + std::recursive_mutex m_mutex; }; } diff -Nru kodi-peripheral-joystick-1.4.7/src/log/Log.cpp kodi-peripheral-joystick-1.4.8/src/log/Log.cpp --- kodi-peripheral-joystick-1.4.7/src/log/Log.cpp 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/src/log/Log.cpp 2013-05-31 22:59:22.000000000 +0000 @@ -27,13 +27,10 @@ #include "LogSyslog.h" #endif -#include "p8-platform/threads/threads.h" - #include #include using namespace JOYSTICK; -using namespace P8PLATFORM; #define MAXSYSLOGBUF (256) @@ -56,7 +53,7 @@ bool CLog::SetType(SYS_LOG_TYPE type) { - P8PLATFORM::CLockObject lock(m_mutex); + std::lock_guard lock(m_mutex); if (m_pipe && m_pipe->Type() == type) return true; // Already set @@ -84,7 +81,7 @@ void CLog::SetPipe(ILog* pipe) { - P8PLATFORM::CLockObject lock(m_mutex); + std::lock_guard lock(m_mutex); const SYS_LOG_TYPE newType = pipe ? pipe->Type() : SYS_LOG_TYPE_NULL; const SYS_LOG_TYPE oldType = m_pipe ? m_pipe->Type() : SYS_LOG_TYPE_NULL; @@ -95,7 +92,7 @@ void CLog::SetLevel(SYS_LOG_LEVEL level) { - P8PLATFORM::CLockObject lock(m_mutex); + std::lock_guard lock(m_mutex); const SYS_LOG_LEVEL newLevel = level; const SYS_LOG_LEVEL oldLevel = m_level; @@ -114,7 +111,7 @@ vsnprintf(buf, MAXSYSLOGBUF - 1, fmt, ap); va_end(ap); - P8PLATFORM::CLockObject lock(m_mutex); + std::lock_guard lock(m_mutex); if (level > m_level) return; diff -Nru kodi-peripheral-joystick-1.4.7/src/log/Log.h kodi-peripheral-joystick-1.4.8/src/log/Log.h --- kodi-peripheral-joystick-1.4.7/src/log/Log.h 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/src/log/Log.h 2013-05-31 22:59:22.000000000 +0000 @@ -22,7 +22,7 @@ #include "ILog.h" -#include "p8-platform/threads/mutex.h" +#include #ifndef esyslog #define esyslog(...) JOYSTICK::CLog::Get().Log(SYS_LOG_ERROR, __VA_ARGS__) @@ -61,6 +61,6 @@ private: ILog* m_pipe; SYS_LOG_LEVEL m_level; - P8PLATFORM::CMutex m_mutex; + std::recursive_mutex m_mutex; }; } diff -Nru kodi-peripheral-joystick-1.4.7/src/storage/ButtonMap.cpp kodi-peripheral-joystick-1.4.8/src/storage/ButtonMap.cpp --- kodi-peripheral-joystick-1.4.7/src/storage/ButtonMap.cpp 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/src/storage/ButtonMap.cpp 2013-05-31 22:59:22.000000000 +0000 @@ -27,18 +27,17 @@ #include "log/Log.h" #include -#include "p8-platform/util/timeutils.h" #include +#include using namespace JOYSTICK; -#define RESOURCE_LIFETIME_MS 2000 // 2 seconds +static constexpr std::chrono::seconds RESOURCE_LIFETIME = std::chrono::seconds(2); CButtonMap::CButtonMap(const std::string& strResourcePath, IControllerHelper *controllerHelper) : m_strResourcePath(strResourcePath), m_device(std::move(std::make_shared())), - m_timestamp(-1), m_bModified(false), m_controllerHelper(controllerHelper) { @@ -47,7 +46,6 @@ CButtonMap::CButtonMap(const std::string& strResourcePath, const DevicePtr& device, IControllerHelper *controllerHelper) : m_strResourcePath(strResourcePath), m_device(device), - m_timestamp(-1), m_bModified(false), m_controllerHelper(controllerHelper) { @@ -94,7 +92,7 @@ { if (Save()) { - m_timestamp = P8PLATFORM::GetTimeMs(); + m_timestamp = std::chrono::steady_clock::now(); m_originalButtonMap.clear(); m_bModified = false; return true; @@ -129,8 +127,8 @@ bool CButtonMap::Refresh(void) { - const int64_t expires = m_timestamp + RESOURCE_LIFETIME_MS; - const int64_t now = P8PLATFORM::GetTimeMs(); + const std::chrono::steady_clock::time_point expires = m_timestamp + RESOURCE_LIFETIME; + const std::chrono::steady_clock::time_point now = std::chrono::steady_clock::now(); if (now >= expires) { diff -Nru kodi-peripheral-joystick-1.4.7/src/storage/ButtonMap.h kodi-peripheral-joystick-1.4.8/src/storage/ButtonMap.h --- kodi-peripheral-joystick-1.4.7/src/storage/ButtonMap.h 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/src/storage/ButtonMap.h 2013-05-31 22:59:22.000000000 +0000 @@ -22,6 +22,7 @@ #include "StorageTypes.h" #include "buttonmapper/ButtonMapTypes.h" +#include #include #include #include @@ -74,7 +75,7 @@ ButtonMap m_originalButtonMap; private: - int64_t m_timestamp; + std::chrono::steady_clock::time_point m_timestamp; bool m_bModified; }; } diff -Nru kodi-peripheral-joystick-1.4.7/src/storage/JustABunchOfFiles.cpp kodi-peripheral-joystick-1.4.8/src/storage/JustABunchOfFiles.cpp --- kodi-peripheral-joystick-1.4.7/src/storage/JustABunchOfFiles.cpp 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/src/storage/JustABunchOfFiles.cpp 2013-05-31 22:59:22.000000000 +0000 @@ -28,7 +28,6 @@ #include using namespace JOYSTICK; -using namespace P8PLATFORM; #define FOLDER_DEPTH 1 // Recurse into max 1 subdirectories (provider) @@ -188,7 +187,7 @@ { static ButtonMap empty; - CLockObject lock(m_mutex); + std::lock_guard lock(m_mutex); // Update index IndexDirectory(m_strResourcePath, FOLDER_DEPTH); @@ -208,7 +207,7 @@ if (!m_bReadWrite) return false; - CLockObject lock(m_mutex); + std::lock_guard lock(m_mutex); CButtonMap* resource = m_resources.GetResource(driverInfo, true); if (resource) @@ -222,7 +221,7 @@ bool CJustABunchOfFiles::GetIgnoredPrimitives(const kodi::addon::Joystick& driverInfo, PrimitiveVector& primitives) { - CLockObject lock(m_mutex); + std::lock_guard lock(m_mutex); // Update index IndexDirectory(m_strResourcePath, FOLDER_DEPTH); @@ -235,7 +234,7 @@ if (!m_bReadWrite) return false; - CLockObject lock(m_mutex); + std::lock_guard lock(m_mutex); // Ensure resource exists m_resources.SetIgnoredPrimitives(driverInfo, primitives); @@ -250,7 +249,7 @@ CDevice device(driverInfo); - CLockObject lock(m_mutex); + std::lock_guard lock(m_mutex); CButtonMap* resource = m_resources.GetResource(device, false); @@ -267,7 +266,7 @@ CDevice device(driverInfo); - CLockObject lock(m_mutex); + std::lock_guard lock(m_mutex); m_resources.Revert(device); @@ -281,7 +280,7 @@ CDevice deviceInfo(driverInfo); - CLockObject lock(m_mutex); + std::lock_guard lock(m_mutex); DevicePtr device = m_resources.GetDevice(deviceInfo); if (device) diff -Nru kodi-peripheral-joystick-1.4.7/src/storage/JustABunchOfFiles.h kodi-peripheral-joystick-1.4.8/src/storage/JustABunchOfFiles.h --- kodi-peripheral-joystick-1.4.7/src/storage/JustABunchOfFiles.h 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/src/storage/JustABunchOfFiles.h 2013-05-31 22:59:22.000000000 +0000 @@ -24,10 +24,9 @@ #include "IDatabase.h" #include "filesystem/DirectoryCache.h" -#include "p8-platform/threads/mutex.h" - #include #include +#include #include namespace JOYSTICK @@ -121,6 +120,6 @@ const bool m_bReadWrite; CDirectoryCache m_directoryCache; CResources m_resources; - P8PLATFORM::CMutex m_mutex; + std::recursive_mutex m_mutex; }; } diff -Nru kodi-peripheral-joystick-1.4.7/src/utils/CommonIncludes.h kodi-peripheral-joystick-1.4.8/src/utils/CommonIncludes.h --- kodi-peripheral-joystick-1.4.7/src/utils/CommonIncludes.h 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/src/utils/CommonIncludes.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2016-2017 Garrett Brown - * Copyright (C) 2016-2017 Team Kodi - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this Program; see the file COPYING. If not, see - * . - * - */ -#pragma once - -#if defined(TARGET_DARWIN) -#include "posix/os-types.h" -#endif - -#include diff -Nru kodi-peripheral-joystick-1.4.7/.travis.yml kodi-peripheral-joystick-1.4.8/.travis.yml --- kodi-peripheral-joystick-1.4.7/.travis.yml 2019-03-17 17:07:34.000000000 +0000 +++ kodi-peripheral-joystick-1.4.8/.travis.yml 2013-05-31 22:59:22.000000000 +0000 @@ -28,7 +28,7 @@ # before_script: - cd $TRAVIS_BUILD_DIR/.. - - git clone --depth=1 https://github.com/xbmc/xbmc.git + - git clone --branch Leia --depth=1 https://github.com/xbmc/xbmc.git - cd ${app_id} && mkdir build && cd build - mkdir -p definition/${app_id} - echo ${app_id} $TRAVIS_BUILD_DIR $TRAVIS_COMMIT > definition/${app_id}/${app_id}.txt