summaryrefslogtreecommitdiff
path: root/src/input_common
AgeCommit message (Collapse)Author
2020-11-19Modify rumble amplificationgerman77
2020-11-17Merge pull request #4866 from Morph1984/mjolnir-p3-prodbunnei
Project Mjölnir: Part 3 - Controller Profiles and Vibration Rework
2020-11-15sdl_impl: Pump SDL Events at 1000 HzMorph
2020-11-15sdl_impl: Revert to the "old" method of mapping sticksMorph
Not all controllers have a SDL_GameController binding. This caused controllers not present in the SDL GameController database to have buttons mapped instead of axes. Furthermore, it was not possible to invert the axes when it could be useful such as emulating a horizontal single joycon or other potential cases. This allows us to invert the axes by reversing the order of mapping (vertical, then horizontal).
2020-11-15controllers/npad: Remove the old vibration filterMorph
Previously we used a vibration filter that filters out amplitudes close to each other. It turns out there are cases where this results into vibrations that are too inaccurate. Remove this and move the 100Hz vibration filter (Only allowing a maximum of 100 vibrations per second) from sdl_impl to npad when enable_accurate_vibrations is set to false.
2020-11-15input_common: Add VibrationDevice and VibrationDeviceFactoryMorph
A vibration device is an input device that returns an unsigned byte as status. It represents whether the vibration device supports vibration or not. If the status returns 1, it supports vibration. Otherwise, it does not support vibration.
2020-11-15configure_input: Add per-player vibrationMorph
Allows for enabling and modifying vibration and vibration strength per player. Also adds a toggle for enabling/disabling accurate vibrations. Co-authored-by: Its-Rei <kupfel@gmail.com>
2020-11-15controllers/npad: Add heuristics to reduce rumble state changesMorph
Sending too many state changes in a short period of time can cause massive performance issues. As a result, we have to use several heuristics to reduce the number of state changes to minimize/eliminate this performance impact while maintaining the quality of these vibrations as much as possible.
2020-11-15configure_input_player: Change "Defaults" button behaviorMorph
RestoreDefaults() now restores the selected devices' mappings using UpdateMappingWithDefaults(). This allows us to move the keyboard mapping from RestoreDefaults() to UpdateMappingWithDefaults().
2020-11-15udp/client: Reduce testing period to 5 secondsMorph
2020-11-15configure_input_player: Implement input exclusivity and persistenceMorph
With this, the "Input Devices" combobox should accurately reflect the input device being used and disallows inputs from other input devices unless the input device is set to "Any".
2020-11-15motion_input: Mark constructor as explicitLioncash
2020-11-15motion_input: Mark member functions as [[nodiscard]] where applicableLioncash
2020-10-28Add hotplug, rumble and fix 3rd party adapters for the GC adaptergerman
2020-10-21sdl_impl: Fix controller reconnection issuesMorph
It turns out that after a controller is disconnected, there is a chance that events from the previous controller are sent/processed after it has been disconnected. This causes the previously disconnected controller to reappear as connected due to GetSDLJoystickBySDLID() emplacing this controller back to the map. Fix this by only returning an SDLJoystick if and only if it exists in the map.
2020-10-20Merge pull request #4809 from Morph1984/mjolnir-p3LC
configure_input_player: Fix modifier buttons
2020-10-20Merge pull request #4627 from Morph1984/fix-dinput-controller-disconnectbunnei
sdl_impl: Erase the SDLJoystick entry after removing a controller
2020-10-20configure_input_player: Fix modifier buttonsMorph
Fix them for real this time, now they finally work.
2020-10-16udp/client: Make use of designated initializers in TestCommunication()Lioncash
Same behavior, but makes the callback list nicer to look at.
2020-10-16udp/client: Take std::function by const reference with TestCommunication()Lioncash
Avoids redundant copies.
2020-10-16sdl_impl: Erase the SDLJoystick entry after removing a controllerMorph
Previously, disconnecting a controller still leaves a null SDLJoystick entry within the vector of SDLJoysticks mapped by GUID. When a DirectInput device of the same GUID is reconnected, it adds that device to a new port causing non-detectable input. Furthermore, opening the "Configure" menu would cause yuzu to crash since it first tries to resolve the name of a null SDLJoystick entry that was not removed. Resolve this by properly erasing the SDLJoystick entry from the vector.
2020-10-15input_common/CMakeLists: Make some warnings errorsLioncash
Makes the input_common code warnings consistent with the rest of the codebase.
2020-10-09Merge pull request #4757 from german77/BetterMotionbunnei
InputCommon: Add compatibility with only accelerometer and auto calibrate for drift
2020-10-08Merge pull request #4677 from german77/ShakeFromButtonbunnei
InputCommon: Add random motion input for buttons
2020-10-06Merge pull request #4727 from FrogTheFrog/patch-1bunnei
Reduce the "shake" requirements when configuring UDP.
2020-10-04Address commentsgerman
2020-10-03Add compatibility with only accelerometer and auto calibrate for driftgerman
2020-09-30Reduce the "shake" requirements when configuring UDP.Lukas Senionis
2020-09-29First implementation of controller rumblegerman
2020-09-25Add random motion input to keyboardgerman
2020-09-25Add random motion input to SDLgerman
2020-09-18Add automap feature for GC adaptergerman
2020-09-17Merge pull request #4594 from german77/MotionHIDbunnei
hid/configuration: Implement motion controls to HID
2020-09-14gc_adapter: Disable MSVC nonstandard extension warning on libusb.hReinUsesLisp
Pragma disable zero-sized array nonstandard extension warning on MSVC.
2020-09-07gc_adapter: Make DeviceConnected() a const member functionLioncash
This doesn't modify instance state, so it can be made const.
2020-09-05Minor cleanupgerman
2020-09-04Add cemu hook changes related to PR #4609german
2020-09-04Remove RealMotionDevicegerman
2020-09-04Include HID and configuration changes related to motiongerman
2020-09-03Merge pull request #4583 from lioncash/truncbunnei
gc_poller: Resolve compilation warnings on MSVC
2020-09-02input_common/motion_input: Make use of Common::PI constantMorph
Also amend the copyright notice to yuzu's instead of Dolphin's, which was mistakenly copy-pasted from another file.
2020-09-02Merge pull request #4570 from german77/motionInputbunnei
input_common: Add a basic class for motion devices
2020-09-01Merge pull request #4382 from FearlessTobi/port-udp-configbunnei
yuzu: Add motion and touch configuration from Citra
2020-08-30Address second batch of reviewsFearlessTobi
2020-08-29Address review comments and fix code compilationFearlessTobi
2020-08-29yuzu: Add motion and touch configurationFearlessTobi
2020-08-28sdl_impl: Reduce allocations in GetButtonMappingForDevice()Lioncash
These maps can be constexpr arrays of std::pair.
2020-08-28sdl_impl: Make use of std::move on std::string where applicableLioncash
Avoids redundant copies.
2020-08-28sdl_impl: Make use of insert_or_assign() where applicableLioncash
Avoids churning ParamPackage instances.
2020-08-28sdl_impl: Prevent type truncation in BuildAnalogParamPackageForButton() ↵Lioncash
default arguments We need to add the 'f' suffix to make the right hand side a float and not a double.