summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon
AgeCommit message (Collapse)Author
2026-03-01DSU: Don't crash on bad hostnameTellowKrinkle
2026-02-20Merge pull request #14335 from TixoRebel/joycon-configJMC47
Core: Add SDL Hints settings
2026-02-20Add new window to configure SDL hints and store them in the main ini fileAndrew Strauss
Signed-off-by: Andrew Strauss <astrauss11@gmail.com>
2026-02-15Added Triforce supportcrediar
2026-02-08Android: Rework input device hotplugJosJuice
Previously, when an input device was connected or disconnected, we would recreate all devices. This commit makes it so we only touch the relevant device instead. This matters because recreating a device causes us to drop all held buttons for that device. Due to Android only delivering inputs as events, we're unable to poll for currently held buttons when recreating a device. This recently became a problem for users of Ayn devices due to a firmware update. Every now and then, something about the display viewports changes, triggering an update to an input device that I assume is a touch input device. This input device isn't something users normally map in Dolphin's controller settings, but it changing was causing Dolphin to drop all held buttons for the device's built-in gamepad as well as any other connected gamepads.
2026-01-26InputConfig: Remove unused local variablesDentomologist
Remove unused vector `controller_names` from `LoadConfig` and `SaveConfig`. The vector has names added to it but they're never used. Prior to d03f9032c129e440e4f07d319be8b52500798e07 these vectors were passed to `DynamicInputTextureManager::GenerateTextures`, but that commit removed those calls.
2026-01-25Remove unused importsMartino Fontana
Yellow squiggly lines begone! Done automatically on .cpp files through `run-clang-tidy`, with manual corrections to the mistakes. If an import is directly used, but is technically unnecessary since it's recursively imported by something else, it is *not* removed. The tool doesn't touch .h files, so I did some of them by hand while fixing errors due to old recursive imports. Not everything is removed, but the cleanup should be substantial enough. Because this done on Linux, code that isn't used on it is mostly untouched. (Hopefully no open PR is depending on these imports...)
2026-01-24Remove VectorToJStringArraySintendo
2026-01-24Clean includesSintendo
2026-01-24Common/FileSearch: Refactor DoFileSearchSintendo
2026-01-17Merge pull request #14289 from Sintendo/typosJMC47
Fix various typos and spelling mistakes
2026-01-17Fix various typos and spelling mistakesSintendo
2026-01-07DInputKeyboardMouse: Always report all possible buttonsJoshua Vandaële
2025-12-22Merge pull request #14158 from jordan-woyak/gcadapter-poll-rate-displayJMC47
GCAdapter: Calculate poll rate for display in UI.
2025-12-09ControllerInterface: Turn off SDL's GameCube controller adapter handling ↵Jordan Woyak
when Dolphin is configured to use the adapter.
2025-11-29DITConfiguration: Prevent a crash if images fail to loadJoshua Vandaële
Recently came across a strange issue where Dolphin would hard crash in most games with this error: ```sh /usr/include/c++/15.2.1/optional:1165: constexpr const _Tp* std::optional<_Tp>::operator->() const [with _Tp = InputCommon::ImagePixelData]: Assertion 'this->_M_is_engaged()' failed. ``` The culprit turned out to be accessing `host_key_image` which is an `std::optional` thay may return `std::nullopt`. I'm not sure why this issue started occuring for me since I've had no issue with my Dynamic Input Textures in the past? But this fixes a crash if the image fails to load.
2025-11-23GCAdapter: Calculate poll rate for display in UI. It's currently updated ↵Jordan Woyak
every 50 reads.
2025-11-06Common: Remove the string parameters from the HookableEvent interface.Jordan Woyak
2025-11-05InputCommon: Make ControllerInterface RegisterDevicesChangedCallback use ↵Jordan Woyak
Common::HookableEvent.
2025-10-09Merge pull request #13963 from jordan-woyak/point-passthru-needs-bound-inputsJMC47
WiimoteEmu: Require IRPassthrough has any bound inputs to operate.
2025-10-04WiimoteEmu: Require IRPassthrough has any bound inputs to operate. Users get ↵Jordan Woyak
confused and mistakenly enable it.
2025-10-04Merge pull request #13752 from jordan-woyak/xlib-duplicate-key-namesAdmiral H. Curtiss
ControllerInterface/Xlib: Combine keycodes with the same name to fix non-working inputs.
2025-09-30SDL: Disable DirectInput handling to work around hangs with the "8BitDo ↵Jordan Woyak
Ultimate 2" controller.
2025-09-30SDL: Name the hotplug thread.Jordan Woyak
2025-09-28Merge pull request #13260 from JosJuice/android-gcadapter-hotplug-callbackJMC47
Android: Detect GCAdapter hotplug using BroadcastReceiver
2025-09-26Merge pull request #13961 from Sam-Belliveau/sdl-gamepad-profileJMC47
Add SDL Gamepad Profile
2025-09-24Prevent profiles with no device specification from resetting deviceSam Belliveau
2025-08-17ControllerInterface/SDL: Remove manual window message pumping on Windows.Jordan Woyak
The mentioned SDL hotplug issue seems to have been fixed.
2025-08-17ControllerInterface/SDL: Don't force SDL_HINT_JOYSTICK_THREAD.Jordan Woyak
SDL3 enables it by default now and things seem to work properly even when it's off these days.
2025-08-01Merge pull request #13177 from jordan-woyak/remove-nunchuk-haxAdmiral H. Curtiss
ControllerEmu: Remove nunchuk stick data hax.
2025-07-30Merge pull request #13781 from ↵JosJuice
Dentomologist/controllerinterface_fix_windows_deadlock ControllerInterface: Fix Windows deadlock
2025-07-27Revert "Android/GCAdapter: Don't join current thread"JosJuice
This reverts commit 74ed5e55326b9d8e67dfbb8dd6f61d04bcae2445. It solves a problem that no longer exists.
2025-07-27Android: Detect GCAdapter disconnection using BroadcastReceiverJosJuice
This lets us get rid of the Reset call in ProcessInputPayload, which was causing us some threading headaches (see 74ed5e5532). Instead we handle disconnection in the same way as the libusb implementation does.
2025-07-27Android: Detect GCAdapter connection using BroadcastReceiverJosJuice
We can register a BroadcastReceiver to have Android tell us when a GC adapter gets connected instead of having a loop where we continuously call SleepCurrentThread(1000) and poll the current status. When waiting for a GC adapter to connect, this both reduces power usage and improves responsiveness. Note that I made openAdapter get the UsbDevice that's been stored by the hotplug code instead of having openAdapter find the UsbDevice on its own like before. This is only because I want to ensure that the UsbDevice being tracked for disconnection is the same as the UsbDevice actually being used, in case the user has multiple adapters connected.
2025-07-27Android: Clean up naming in Java_GCAdapter and Java_WiimoteAdapterJosJuice
This isn't how we name things in Java/Kotlin.
2025-07-24InputCommon/ControllerEmu: Fix saving of Wii Remote "Attach MotionPlus" setting.Jordan Woyak
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-12ControllerInterface/Xlib: Combine keycodes with the same name to fix ↵Jordan Woyak
non-working inputs.
2025-06-09Merge pull request #13702 from CostPerUnit/masterJMC47
MappingWidget: Add Advanced Configuration Button to Point And Point Passthrough "Enable" boxes
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