summaryrefslogtreecommitdiff
path: root/src/input_common (follow)
Commit message (Collapse)AuthorAgeFilesLines
* sdl_impl: Fix controller reconnection issuesGravatar Morph2020-10-211-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.
* Merge pull request #4809 from Morph1984/mjolnir-p3Gravatar LC2020-10-201-2/+0
|\ | | | | configure_input_player: Fix modifier buttons
| * configure_input_player: Fix modifier buttonsGravatar Morph2020-10-201-2/+0
| | | | | | | | Fix them for real this time, now they finally work.
* | Merge pull request #4627 from Morph1984/fix-dinput-controller-disconnectGravatar bunnei2020-10-201-15/+13
|\ \ | |/ |/| sdl_impl: Erase the SDLJoystick entry after removing a controller
| * sdl_impl: Erase the SDLJoystick entry after removing a controllerGravatar Morph2020-10-161-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.
* | udp/client: Make use of designated initializers in TestCommunication()Gravatar Lioncash2020-10-161-2/+5
| | | | | | | | Same behavior, but makes the callback list nicer to look at.
* | udp/client: Take std::function by const reference with TestCommunication()Gravatar Lioncash2020-10-162-5/+5
|/ | | | Avoids redundant copies.
* input_common/CMakeLists: Make some warnings errorsGravatar Lioncash2020-10-1516-191/+237
| | | | | Makes the input_common code warnings consistent with the rest of the codebase.
* Merge pull request #4757 from german77/BetterMotionGravatar bunnei2020-10-092-8/+102
|\ | | | | InputCommon: Add compatibility with only accelerometer and auto calibrate for drift
| * Address commentsGravatar german2020-10-042-40/+40
| |
| * Add compatibility with only accelerometer and auto calibrate for driftGravatar german2020-10-032-12/+106
| |
* | Merge pull request #4677 from german77/ShakeFromButtonGravatar bunnei2020-10-089-5/+295
|\ \ | | | | | | InputCommon: Add random motion input for buttons
| * | Add random motion input to keyboardGravatar german2020-09-254-0/+65
| | |
| * | Add random motion input to SDLGravatar german2020-09-255-5/+230
| | |
* | | Merge pull request #4727 from FrogTheFrog/patch-1Gravatar bunnei2020-10-061-2/+6
|\ \ \ | |_|/ |/| | Reduce the "shake" requirements when configuring UDP.
| * | Reduce the "shake" requirements when configuring UDP.Gravatar Lukas Senionis2020-09-301-2/+6
| |/
* / First implementation of controller rumbleGravatar german2020-09-291-1/+38
|/
* Add automap feature for GC adapterGravatar german2020-09-183-1/+103
|
* Merge pull request #4594 from german77/MotionHIDGravatar bunnei2020-09-179-135/+471
|\ | | | | hid/configuration: Implement motion controls to HID
| * Minor cleanupGravatar german2020-09-051-19/+16
| |
| * Add cemu hook changes related to PR #4609Gravatar german2020-09-046-137/+426
| |
| * Remove RealMotionDeviceGravatar german2020-09-044-7/+25
| |
| * Include HID and configuration changes related to motionGravatar german2020-09-043-1/+33
| |
* | gc_adapter: Disable MSVC nonstandard extension warning on libusb.hGravatar ReinUsesLisp2020-09-141-0/+9
| | | | | | | | Pragma disable zero-sized array nonstandard extension warning on MSVC.
* | gc_adapter: Make DeviceConnected() a const member functionGravatar Lioncash2020-09-073-9/+9
|/ | | | This doesn't modify instance state, so it can be made const.
* Merge pull request #4583 from lioncash/truncGravatar bunnei2020-09-031-3/+5
|\ | | | | gc_poller: Resolve compilation warnings on MSVC
| * gc_poller: Resolve compilation warnings on MSVCGravatar Lioncash2020-08-251-3/+5
| | | | | | | | We just need to make our intentional implicit truncations explicit.
* | input_common/motion_input: Make use of Common::PI constantGravatar Morph2020-09-022-4/+9
| | | | | | | | Also amend the copyright notice to yuzu's instead of Dolphin's, which was mistakenly copy-pasted from another file.
* | Merge pull request #4570 from german77/motionInputGravatar bunnei2020-09-023-0/+246
|\ \ | | | | | | input_common: Add a basic class for motion devices
| * | Fix orientation errors and improve drift correctionGravatar german2020-08-272-14/+31
| | |
| * | Address commentsGravatar german2020-08-272-85/+65
| | |
| * | Implement a basic class for motion devicesGravatar german2020-08-273-0/+249
| | |
* | | Merge pull request #4382 from FearlessTobi/port-udp-configGravatar bunnei2020-09-015-0/+89
|\ \ \ | | | | | | | | yuzu: Add motion and touch configuration from Citra
| * | | Address second batch of reviewsGravatar FearlessTobi2020-08-303-6/+2
| | | |
| * | | Address review comments and fix code compilationGravatar FearlessTobi2020-08-293-6/+11
| | | |
| * | | yuzu: Add motion and touch configurationGravatar FearlessTobi2020-08-295-0/+88
| | | |
* | | | sdl_impl: Reduce allocations in GetButtonMappingForDevice()Gravatar Lioncash2020-08-281-31/+37
| | | | | | | | | | | | | | | | These maps can be constexpr arrays of std::pair.
* | | | sdl_impl: Make use of std::move on std::string where applicableGravatar Lioncash2020-08-281-3/+3
| | | | | | | | | | | | | | | | Avoids redundant copies.
* | | | sdl_impl: Make use of insert_or_assign() where applicableGravatar Lioncash2020-08-281-14/+18
| | | | | | | | | | | | | | | | Avoids churning ParamPackage instances.
* | | | sdl_impl: Prevent type truncation in BuildAnalogParamPackageForButton() ↵Gravatar Lioncash2020-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | default arguments We need to add the 'f' suffix to make the right hand side a float and not a double.
* | | | sdl_impl: Simplify make_tuple callGravatar Lioncash2020-08-281-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.
* | | | sdl_impl: Mark FromEvent() as a const member functionGravatar Lioncash2020-08-281-2/+2
|/ / / | | | | | | | | | This doesn't modify internal member state, so it can be marked as const.
* | | input_common/main: Remove unnecessary headersGravatar Lioncash2020-08-283-5/+11
| | |
* | | input_common/main: Remove unimplemented prototypeGravatar Lioncash2020-08-281-3/+0
| | | | | | | | | | | | | | | I forgot to remove this in the rebase when removing most of the global variables within the input common codebase.
* | | input_common: Eliminate most global stateGravatar Lioncash2020-08-272-153/+227
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Abstracts most of the input mechanisms under an InputSubsystem class that is managed by the frontends, eliminating any static constructors and destructors. This gets rid of global accessor functions and also allows the frontends to have a more fine-grained control over the lifecycle of the input subsystem. This also makes it explicit which interfaces rely on the input subsystem instead of making it opaque in the interface functions. All that remains to migrate over is the factories, which can be done in a separate change.
* | input_common/main: Add "/Mouse" to the display nameGravatar Morph2020-08-261-1/+1
| |
* | input_common: Fix directional deadzone valuesGravatar Morph2020-08-262-2/+2
| | | | | | | | The hardware tested value is 0.5 which translates to SHRT_MAX / 2
* | Address feedbackGravatar Morph2020-08-265-44/+32
| |
* | Project Mjölnir: Part 1Gravatar Morph2020-08-2611-102/+798
|/ | | | | Co-authored-by: James Rowe <jroweboy@gmail.com> Co-authored-by: Its-Rei <kupfel@gmail.com>
* General: Tidy up clang-format warnings part 2Gravatar Lioncash2020-08-131-4/+2
|