summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface
AgeCommit message (Collapse)Author
2025-07-30Merge pull request #13781 from ↵JosJuice
Dentomologist/controllerinterface_fix_windows_deadlock ControllerInterface: Fix Windows deadlock
2025-07-20Merge pull request #13674 from JosJuice/android-visualize-inputJordan Woyak
Android: Show input indicators in controller settings
2025-07-12Merge pull request #13775 from jordan-woyak/sdl-gamepad-renameJordan Woyak
InputCommon: Rename SDL input backend GameController to Gamepad.
2025-07-12Fix various warningsJoshua Vandaële
2025-06-28ControllerInterface: Fix Windows deadlockDentomologist
Remove the redundant s_populate_mutex and only use ControllerInterface::m_devices_population_mutex instead to prevent a deadlock caused by locking them in opposite orders. The device population functions in the win32 InputBackend previously locked s_populate_mutex first before calling various functions that locked m_devices_population_mutex. This normally worked but ControllerInterface::RefreshDevices locks m_devices_population_mutex first and then calls HandleWindowChange which then locked s_populate_mutex, potentially causing the deadlock. Fix this by using PlatformPopulateDevices to lock m_devices_population_mutex before running the code that was previously protected by s_populate_mutex. The functions in question lock m_devices_population_mutex anyway, so this shouldn't meaningfully increase contention on the lock. Reproduction steps: * Let Dolphin finish startup. * In Win32.cpp::OnDevicesChanged set a breakpoint on the call to PlatformPopulateDevices. When the breakpoint is triggered the function will have locked s_populate_mutex, but since PlatformPopulateDevices won't have run yet m_devices_population_mutex will still be unlocked. * Unplug a device from your computer. * Wait for the breakpoint to trigger. (At this point you can plug the device back in). * Freeze the ntdll.dll!TppWorkerThread() that triggered the breakpoint. * Resume Dolphin and start a game. * Core::EmuThread will call ControllerInterface::ChangeWindow which calls RefreshDevices. It locks m_devices_population_mutex, then calls InputBackend::HandleWindowChange, which tries to lock s_populate_mutex. * Unfreeze ntdll.dll!TppWorkerThread(). At this point EmuThread and TppWorkerThread are deadlocked. The UI is still responsive since the Host thread is unaffected, but trying to stop the game or close Dolphin normally will fail since EmuThread is unable to stop.
2025-06-25InputCommon: Rename SDL input backend GameController to Gamepad.Jordan Woyak
2025-06-24Merge pull request #13694 from jordan-woyak/sdl3JMC47
Update to SDL3
2025-06-24DolphinQt: Make Calibration autocomplete when data is "sensible" and stick ↵Jordan Woyak
is returned to neutral position.
2025-06-14DolphinQt/InputCommon: Move some calibration logic to InputCommon and make ↵Jordan Woyak
the "Calibrate" button also map inputs.
2025-06-14InputCommon: Make InputDetector::Start take a span instead of a vector.Jordan Woyak
2025-06-14InputCommon: Fix occasional misidentification of analog input detection.Jordan Woyak
2025-06-14Source: Remove redundant lambda parameter listsDr. Dystopia
2025-06-07Merge pull request #13522 from ↵Jordan Woyak
tygyh/Enforce-overriding-destructor-style-Core&UnitTests Core & UnitTests: Make overriding explicit and remove redundant virtual specifiers on overriding destructors
2025-06-07InputCommon: Update to use SDL3 and bump the SDL submodule in Externals to ↵Jordan Woyak
release-3.2.16.
2025-06-07Android: Update advanced mapping dialog when devices changeJosJuice
Without this, there was a bug where if you turned the device's screen off and on again while in the advanced mapping dialog, the input indicators would stop updating. This is because turning the screen on again causes devices to refresh, which causes all devices to be recreated, leaving the AdvancedMappingControlViewHolders stuck referencing controls belonging to devices that are no longer being updated.
2025-06-07Android: Make input state changes observableJosJuice
2025-05-02SDL: Check if touchpad exists before getting inputDentomologist
Verify a touchpad is present before polling it for input. Without this check the Debug log is spammed with the message "error: Parameter 'touchpad' is invalid" if you have a controller without a touchpad. One would think every touchpad supports at least 1 finger, but in case there's some weird edge case check the finger count to be sure.
2025-05-01Make overriding explicit and remove redundant virtual specifiers on ↵Dr. Dystopia
overriding destructors - Core & UnitTests
2025-04-30Merge pull request #13436 from JoshuaVandaele/clang-format-19OatmealDome
Update clang-format to version 19
2025-04-23linter: Apply clang-format 19.1 formattingJoshua Vandaële
find ./Source/ -name '*.cpp' -o -name '*.h' | xargs clang-format-19 -i
2025-03-30InputCommon: Move SDL Device class into its own cpp/h files.Jordan Woyak
2025-03-28Merge pull request #13434 from JosJuice/android-non-blocking-input-detectionJMC47
Android: Don't use separate thread for MotionAlertDialog
2025-03-23Android: Don't use separate thread for MotionAlertDialogJosJuice
This is an Android continuation of bc95c00. We now call InputDetector::Update immediately after receiving an input event from Android instead of periodically calling it in a sleep loop. This improves detection of very short inputs, which are especially likely to occur for volume buttons on phones (or at least on my phone) if you don't intentionally keep them held down.
2025-03-23Merge pull request #13093 from mitaclaw/ranges-modernization-4-projectionJMC47
Ranges Algorithms Modernization - Projection
2025-03-10Merge pull request #13276 from JoshuaVandaele/sfml-3.0.0JMC47
Migrate to SFML 3.0.0
2025-03-09Modernize `std::stable_sort` with ranges and projectionsmitaclaw
2025-03-02InputCommon: Use Clock from CommonTypes.Jordan Woyak
2025-02-25Migrate to SFML>=3.0.0Joshua Vandaële
2025-02-01DolphinQt/Mapping: Add setting to enable waiting for alternate mappingsJordan Woyak
using the OR-operator.
2025-01-21InputCommon: Add support for SDL gamecontroller rumble triggers.Jordan Woyak
2025-01-21InputCommon: Make SDL Motor L/R Outputs not fight each other.Jordan Woyak
2025-01-01InputCommon: Move input mapping function into a class for non-blocking usage.Jordan Woyak
2025-01-01Simplify `std::find` with `Common::Contains`mitaclaw
In NandPaths.cpp, the `std::initializer_list<char>` of illegal characters has been turned into a `char[]` (similar to the one in GameList.cpp). The reverse iteration in ResourcePack.cpp seemed to provide no benefits, and doing without it it seemed to have no ill effects.
2024-12-26Merge pull request #13116 from mitaclaw/ranges-modernization-8-trivial-ofJMC47
Ranges Algorithms Modernization - Of
2024-12-20Merge pull request #13091 from mitaclaw/ranges-modernization-2-returnsJMC47
Ranges Algorithms Modernization - Return
2024-12-15Modernize `std::any_of` with rangesmitaclaw
In WiimoteReal.cpp, JitRegCache.cpp, lambda predicates were replaced by pointers to member functions because ranges algorithms are able invoke those. In ConvertDialog.cpp, the `std::mem_fn` helper was removed because ranges algorithms are able to handle pointers to member functions as predicates.
2024-12-15Modernize `std::all_of` with rangesmitaclaw
In DITSpecification.cpp, MaterialAsset.cpp, and ShaderAsset.cpp, lambda predicates were replaced by pointers to member functions because ranges algorithms are able invoke those. In NetPlayClient.cpp, the non-trivial `NetPlay::Player` elements were being passed by value in `NetPlayClient::DoAllPlayersHaveGame()`. This has been fixed. In WIABlob.cpp, the second example's predicate was returning the `std::optional` by value instead of implicitly converting it to a bool. This has been fixed.
2024-12-04InputCommon/SDL: Add touchpad inputs.Jordan Woyak
2024-12-04Merge pull request #13174 from jordan-woyak/sdl-batteryJMC47
ControllerInterface/SDL: Add Battery Input.
2024-11-17Merge pull request #13156 from jordan-woyak/sdl-no-wgiJosJuice
ControllerInterface/SDL: Disable SDL's Windows.Gaming.Input controller handling.
2024-11-04ControllerInterface/SDL: Add Battery Input.Jordan Woyak
2024-11-03InputCommon: Move FullAnalogSurface class definition out of header file.Jordan Woyak
2024-11-03InputCommon: Rename AddAnalogInputs to AddFullAnalogSurfaceInputs.Jordan Woyak
2024-11-02InputCommon: Disable DualSense Player LEDdreamsyntax
2024-10-31ControllerInterface/SDL: Fix device removal event processing.Jordan Woyak
2024-10-30ControllerInterface/SDL: Disable SDL's Windows.Gaming.Input controller handling.Jordan Woyak
2024-10-17Modernize `std::unique` with rangesmitaclaw
The new return value is `std::ranges::subrange`.
2024-10-15Merge pull request #13090 from mitaclaw/ranges-modernization-1-trivialJosJuice
Ranges Algorithms Modernization - Trivial
2024-10-10C++20: Synthesize `operator!=` From `operator==`mitaclaw
The inequality operator is automatically generated by the compiler if `operator==` is defined.
2024-10-10Modernize `std::sort` with rangesmitaclaw