summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/DualShockUDPClient
AgeCommit message (Collapse)Author
2023-12-18Input: Improve Controller Interface devices threadingFiloppi
This specific issue was already addressed by https://github.com/dolphin-emu/dolphin/pull/11635 though I felt like there was something more we could do, and wasn't too happy with the likelihood of devices update calls being skipped (due to `m_devices_population_mutex` being locked).
2023-08-17Use structs for config callback IDsJosJuice
This way you can't mix up regular config callback IDs and CPU thread config callback IDs. (It would be rather bad if you did!)
2023-02-15ControllerInterface: Fix uninitialized variables in DualShockUDPClientPokechu22
Strangely, this case did not trigger a C26495 warning in Visual Studio's analyzer; instead, I spotted this when using Valgrind.
2022-11-01ControllerInterface: DSU InputBackend implementation.Jordan Woyak
2022-04-03ControllerInterface: Update sort priorities.Jordan Woyak
2022-01-01Replace remaining uses of zlib crc32 with Common/Hash.hPokechu22
2021-12-05InputCommon: fix default input config default device not being loaded/foundFiloppi
Fixes bug: https://bugs.dolphin-emu.org/issues/12744 Before https://github.com/dolphin-emu/dolphin/commit/e1e3db13baabefa89991388d37db0bb260c4f535 the ControllerInterface m_devices_mutex was "wrongfully" locked for the whole Initialize() call, which included the first device population refresh, this has the unwanted (accidental) consequence of often preventing the different pads (GC Pad, Wii Contollers, ...) input configs from loading until that mutex was released (the input config defaults loading was blocked in EmulatedController::LoadDefaults()), which meant that the devices population would often have the time to finish adding its first device, which would then be selected as default device (by design, the first device added to the CI is the default default device, usually the "Keyboard and Mouse" device). After the commit mentioned above removed the unnecessary m_devices_mutex calls, the default default device would fail to load (be found) causing the default input mappings, which are specifically written for the default default device on every platform, to not be bound to any physical device input, breaking input on new dolphin installations (until a user tried to customize the default device manually). Default devices are now always added synchronously to avoid the problem, and so they should in the future (I added comments and warnings to help with that)
2021-10-13Fix all uninitialized variable warnings (C26495)Pokechu22
2021-07-05treewide: convert GPLv2+ license info to SPDX tagsPierre Bourdon
SPDX standardizes how source code conveys its copyright and licensing information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX tags are adopted in many large projects, including things like the Linux kernel.
2021-06-07ControllerInterface: fix DSU thread safety and use PlatformPopulateDevices()Filoppi
2021-06-07ControllerInterface: devices population is now async so implement devices ↵Filoppi
sorting priority This helps us keeping the most important devices (e.g. Mouse and Keyboard) on the top of the list of devices (they still are on all OSes supported by dolphin and to make hotplug devices like DSU appear at the bottom.
2021-05-31ControllerInterface: make DSU inputs start from resting pose instead of 0. ↵Filoppi
Add battery level
2021-05-31ControllerInterface: DSU polish: avoid hanging host thread, add ↵Filoppi
disconnection detection, ... -Reworked thread waits to never hang the Host thread for more than a really small time (e.g. when disabling DSU its thread now closes almost immediately) -Improve robustness when a large amount of devices are connected -Add devices disconnection detection (they'd stay there forever until manually refreshed)
2021-05-31ControllerInterface: fix DSU using the same client uid between server and ↵Filoppi
controllers queries that's not the way it's supposed to work
2021-05-05InputCommon: replace SerialInterface log with ControllerInterfaceFiloppi
where appropriate. SerialInterface was a leftover from the past, and makes no sense to be used on actual/real controllers.
2021-03-05InputCommon: instead of blocking on individual DSU server sockets, block on ↵iwubcode
a selector built up from all server sockets
2021-02-26Common: don't call OnConfigChanged() unless it has actually changedFiloppi
DualShock UDP Client is the only place in the code that assumed OnConfigChanged() is called at least once on startup or it won't load up the setting, so I took care of that
2021-01-03Fix DualShockUDP not adding/removing devices correctlyFilippo Tarpini
-If adding 2 devices with the same name, they their unique id wouldn't be increased, causing a conflict. -Removing a device wouldn't actually remove it from the internal devices list because the list of devices had already been updated when going through it. -It was possible to remove devices belonging to other sources by adding a device with the same name and then removing it.
2020-10-23InputCommon: Migrate logging over to fmtLioncash
Continues the migration of the logging calls over to the fmt capable ones.
2020-07-17DolphinQt / InputCommon - add DSU string validator to avoid crashes, limited ↵iwubcode
backwards compatibility support
2020-07-17DolphinQt / InputCommon: Support multiple DSU serversiwubcode
2020-05-02Remove redundant Config prefix from ConfigInfo/ConfigLocationLéo Lam
Both structs are already in the Config namespace.
2020-02-22InputCommon: Constify Device::Input::IsDetectable function.Jordan Woyak
2020-01-13ControllerInterface/DSUClient: Eliminate m_accl/m_gyro state by accessing ↵Jordan Woyak
the pad data directly like every other input.
2020-01-13ControllerInterface: Minor DSU client device cleanups.Jordan Woyak
2020-01-13ControllerInterface: Exposse DSU client battery level as an input.Jordan Woyak
2019-12-23DualShockUDPClient: downgrade spurious NOTICE_LOGsPierre Bourdon
2019-11-22InputCommon/DualShockUDPClient: Use an alias for the clock typeLioncash
Makes code slightly less verbose without exposing the whole chrono header to the current source file.
2019-11-22InputCommon/DualShockUDPClient: Use deduction guides for lock_guardLioncash
With C++17, we can use template deduction guides provided by the standard library. This allows the omission of the mutex type itself.
2019-11-22InputCommon/DualShockUDPClient: Make use of std::array where applicableLioncash
Provides the same semantics of a C array, but is much nicer to work with. Notably, it makes all cases of performing comparisons with said arrays significantly less reading-involved.
2019-11-22InputCommon/DualShockUDPClient: Relocate settings to top of source fileLioncash
This is a small namespace, so we can move it to the top of the file to get it out of the way of everything else.
2019-11-22InputCommon/DualShockUDPClient: In-class initialize members where applicableLioncash
Deduplicates members within the constructor's initializer list.
2019-11-22InputCommon/DualShockUDPClient: Add missing header guardLioncash
Prevents potential inclusion issues from occurring.
2019-11-09InputCommon: Detect when evdev exposes acceleration/gyroscope data.Jordan Woyak
2019-10-27Rename all instances of "CemuhookUDPServer"/"UDPServer" to ↵rlnilsen
"DualShockUDPClient"/"DSUClient".