summaryrefslogtreecommitdiff
path: root/src/input_common/sdl/sdl_impl.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-11-24input_common: Rewrite SDLGravatar german771-1658/+0
2021-10-11input_common/sdl: Fix joystick rangeGravatar german771-3/+4
2021-09-10input_common: Enable steam controllers and 8 player supportGravatar german771-5/+7
2021-09-06input_common: Add alternative string for joyconsGravatar german771-2/+16
2021-08-12input_common: Disable sdl raw input modeGravatar german771-0/+3
2021-08-07input_common: Improve SDL joystick and hide toggle optionGravatar german771-24/+63
2021-07-20input/sdl_impl: fix rumble support on DualSense. (#6683)Gravatar Nicolas Jallamion1-2/+2
- value return can be different 0, is not error is normal, error is only -1.
2021-07-15input_common: Make button threshold customizableGravatar german771-3/+3
2021-07-15input_common: Support SDL toggle buttonsGravatar german771-4/+51
2021-05-22input_common: Add dual joycon supportGravatar german771-58/+223
2021-05-15input_common: Implement SDL motionGravatar german771-3/+150
2021-05-15input_common: Fix crash when controller disconnectsGravatar german771-1/+3
2021-05-14input_common: Rewrite sdl analog mappingGravatar german771-25/+25
2021-04-18general: Ignore implicit-fallthrough for SDL.hGravatar lat9nq1-0/+10
SDL 2.0.14 introduces an incompatibility with Clang, causing it to trigger -Wimplicit-fallthrough even though it is marked. Ignore it for now, with a comment mentioning why this is needed.
2021-04-14common: Move settings to common from core.Gravatar bunnei1-1/+1
- Removes a dependency on core and input_common from common.
2021-03-30InputCommon: Name properly xbox 360 and one controllers, Fix mappings for ↵Gravatar german771-6/+20
Nintendo Pro controllers
2021-02-18Revert "Port citra-emu/citra#5123: "SDL: Disable hidapi drivers due to ↵Gravatar Morph1-7/+0
compatibility problems with certain controllers""
2021-02-06Make settings controller image change with controller inputGravatar german1-0/+10
2021-01-23sdl_impl: Set the maximum vibration duration to 1 secondGravatar Morph1-2/+6
2020-12-30Port citra-emu/citra#5509Gravatar german1-2/+45
2020-12-26Allow to invert analog axis with right clickGravatar german1-5/+21
2020-11-23input_common: Add more missing [[maybe_unused]] from #4927.Gravatar bunnei1-1/+2
2020-11-22input_common: Treat warnings as errorsGravatar Lioncash1-1/+3
Migrates over warnings as errors for input common to match how the common library treats warnings as errors.
2020-11-19Modify rumble amplificationGravatar german771-2/+1
2020-11-15sdl_impl: Pump SDL Events at 1000 HzGravatar Morph1-1/+1
2020-11-15sdl_impl: Revert to the "old" method of mapping sticksGravatar Morph1-32/+13
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 filterGravatar Morph1-15/+0
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 VibrationDeviceFactoryGravatar Morph1-16/+58
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-15controllers/npad: Add heuristics to reduce rumble state changesGravatar Morph1-29/+25
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-10-21sdl_impl: Fix controller reconnection issuesGravatar Morph1-85/+84
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-16sdl_impl: Erase the SDLJoystick entry after removing a controllerGravatar Morph1-15/+13
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 errorsGravatar Lioncash1-37/+40
Makes the input_common code warnings consistent with the rest of the codebase.
2020-09-29First implementation of controller rumbleGravatar german1-1/+38
2020-09-25Add random motion input to SDLGravatar german1-0/+190
2020-08-30sdl_joystick: disable the use of the hidapi drivers due to many problems ↵Gravatar Vitor Kiguchi1-0/+7
caused by them. The main problem is the loss of compatibility with some controllers, but there are also unwanted changes to the behaviour of PS4 controllers (hardcoded lightbar color).
2020-08-28sdl_impl: Reduce allocations in GetButtonMappingForDevice()Gravatar Lioncash1-31/+37
These maps can be constexpr arrays of std::pair.
2020-08-28sdl_impl: Make use of std::move on std::string where applicableGravatar Lioncash1-3/+3
Avoids redundant copies.
2020-08-28sdl_impl: Make use of insert_or_assign() where applicableGravatar Lioncash1-14/+18
Avoids churning ParamPackage instances.
2020-08-28sdl_impl: Prevent type truncation in BuildAnalogParamPackageForButton() ↵Gravatar Lioncash1-1/+1
default arguments We need to add the 'f' suffix to make the right hand side a float and not a double.
2020-08-28sdl_impl: Simplify make_tuple callGravatar Lioncash1-1/+1
The purpose of make_tuple is that you don't need to explicitly type out the types of the things that comprise said tuple. Given this just returns default values, we can simplify this a bit.
2020-08-28sdl_impl: Mark FromEvent() as a const member functionGravatar Lioncash1-2/+2
This doesn't modify internal member state, so it can be marked as const.
2020-08-28input_common/main: Remove unnecessary headersGravatar Lioncash1-1/+1
2020-08-26input_common: Fix directional deadzone valuesGravatar Morph1-1/+1
The hardware tested value is 0.5 which translates to SHRT_MAX / 2
2020-08-26Address feedbackGravatar Morph1-32/+20
2020-08-26Project Mjölnir: Part 1Gravatar Morph1-90/+313
Co-authored-by: James Rowe <jroweboy@gmail.com> Co-authored-by: Its-Rei <kupfel@gmail.com>
2020-08-10Remove UI changesGravatar ameerj1-1/+1
This PR is now only the Analog devices handling the range value defaulting at 100%
2020-08-10undo unnecessary newlines, slider range 50-150Gravatar Ameer1-1/+1
2020-08-10Add range slider for analog sticksGravatar Ameer1-11/+14
2020-07-02Fix unnecessary diffsGravatar Ameer1-1/+0
2020-06-21Cleanup after linterGravatar Ameer1-36/+16