summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon
AgeCommit message (Collapse)Author
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
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-29InputCommon/DolphinQt: Add advanced settings button for "Point" and "Point ↵CostPerUnit
(Passthrough)" "Enabled" checkboxes.
2025-05-03Common and VideoCommon: Change texture data from std::vector to ↵Jordan Woyak
Common::UniqueBuffer.
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-25Merge pull request #13476 from jordan-woyak/sdl-headerTilka
InputCommon: Move SDL Device class into its own cpp/h files.
2025-04-23linter: Apply clang-format 19.1 formattingJoshua Vandaële
find ./Source/ -name '*.cpp' -o -name '*.h' | xargs clang-format-19 -i
2025-04-10InputCommon: Activate IMU Accelerometer and Gyroscope when any direction has ↵Jordan Woyak
a bound input.
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-23Merge pull request #13311 from ↵JMC47
iwubcode/dynamic_input_textures_reduce_image_writes Core / DolphinQt / InputCommon: reduce the number disk writes when using DynamicInputTextures
2025-03-22Core / DolphinQt / InputCommon: reduce the number disk writes when using ↵iwubcode
DynamicInputTextures
2025-03-15InputCommon/ControllerEmu: Break out functionality of EmulatedControllerJordan Woyak
to eliminate redundant unused members in Wii Remote extension objects.
2025-03-10Merge pull request #13363 from JoshuaVandaele/nowarningsJMC47
Fix multiple minor warnings
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-21Fix multiple minor warningsJoshua Vandaële
- ExpressionParser.cpp: `-Wmissing-declarations` - AchievementManager.cpp: `-Wsign-compare` - SI.cpp: `-Warray-bounds=` - NetPlayClient.cpp: `-Wdangling-reference`
2025-02-15Merge pull request #13320 from jordan-woyak/detect-alternationsJMC47
DolphinQt/Mapping: Add setting to enable waiting for alternate mappings.
2025-02-08Merge pull request #13318 from sanjay900/dont-detach-macosOatmealDome
LibusbDevice: Don't detach kernel drivers on macOS
2025-02-02InputCommon/ExpressionParser: Add compound assignment operators.Jordan Woyak
2025-02-02Merge pull request #13208 from ↵Admiral H. Curtiss
Dentomologist/wiitasinputwindow_update_on_attachment_change WiiTASInputWindow: Update controls when attachment changes
2025-02-02Merge pull request #13315 from jordan-woyak/func-exp-cleanupAdmiral H. Curtiss
InputCommon/ExpressionParser: Function argument parsing minor cleanup.
2025-02-02Merge pull request #13314 from jordan-woyak/input-expressions-assignment-op-fixAdmiral H. Curtiss
InputCommon: Fix input expression assignment operator behavior.
2025-02-02Merge pull request #13280 from jordan-woyak/input-expressions-highlightingJMC47
InputCommon/DolphinQt: Fix sometimes broken syntax highlighting in IOWindow.
2025-02-01DolphinQt/Mapping: Add setting to enable waiting for alternate mappingsJordan Woyak
using the OR-operator.