diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2023-12-29 20:17:04 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-29 20:17:04 +0100 |
| commit | 99fbc4b97ecc21c82a8cde602af1bf3b47a186d2 (patch) | |
| tree | c42b16871bed955e337895a8d3c42ee17cf164c8 /Source/Core/InputCommon/ControllerInterface/SteamDeck | |
| parent | bf0ac9de0ccf004b86ccadd0a0212fc6804d7600 (diff) | |
| parent | e456bef163c1b667ff5a045a4bda66b30326ae90 (diff) | |
Merge pull request #11885 from Filoppi/devices_deadlock_fix_v2
Input: Improve Controller Interface devices threading
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/SteamDeck')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/SteamDeck/SteamDeck.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/SteamDeck/SteamDeck.cpp b/Source/Core/InputCommon/ControllerInterface/SteamDeck/SteamDeck.cpp index 0a0dc88387..7cd76d0710 100644 --- a/Source/Core/InputCommon/ControllerInterface/SteamDeck/SteamDeck.cpp +++ b/Source/Core/InputCommon/ControllerInterface/SteamDeck/SteamDeck.cpp @@ -113,7 +113,7 @@ public: Device(hid_device* device); std::string GetName() const final override; std::string GetSource() const final override; - void UpdateInput() override; + Core::DeviceRemoval UpdateInput() override; private: hid_device* m_device; @@ -279,7 +279,7 @@ std::string Device::GetSource() const return std::string(STEAMDECK_SOURCE_NAME); } -void Device::UpdateInput() +Core::DeviceRemoval Device::UpdateInput() { // As of a certain mid-2023 update to the Steam client, // Steam will disable gyro data if gyro is not mapped in Steam Input. @@ -308,16 +308,18 @@ void Device::UpdateInput() } // In case there were no reports available to be read, bail early. if (!got_anything) - return; + return Core::DeviceRemoval::Keep; if (rpt.major_ver != 0x01 || rpt.minor_ver != 0x00 || rpt.report_type != 0x09 || rpt.report_sz != sizeof(rpt)) { ERROR_LOG_FMT(CONTROLLERINTERFACE, "Steam Deck bad report"); - return; + return Core::DeviceRemoval::Keep; } m_latest_input = rpt; + + return Core::DeviceRemoval::Keep; } } // namespace ciface::SteamDeck |
