Commit graph

72 commits

Author SHA1 Message Date
Narr the Reg
243f2931b5 input_common: Create an update engine 2023-01-05 19:24:29 -06:00
Liam
41ba0d07e6 cmake: make libusb optional 2022-12-28 17:26:46 -05:00
german77
f7790b5e3b input_common: Cleanup project 2022-12-18 15:33:11 -06:00
german77
3cc666b845 input_common: Add virtual gamepad 2022-12-16 18:26:11 -06:00
liamwhite
994e446168 Merge pull request #9322 from german77/pump_events
input_common: Pump SDL events from main thread
2022-11-29 18:45:25 -05:00
Lioncash
0862aabdc6 common/input: Add helpers functions for creating input and output devices
Avoids the redundancy of needing to explictly specify the common
namespace and the type.
2022-11-28 10:00:37 -05:00
german77
cddbfe5e67 input_common: Pump sdl events from main thread 2022-11-27 11:09:40 -06:00
german77
23d7d8b9df yuzu-cmd: Fix input callback crash on close 2022-11-27 10:53:22 -06:00
german77
004f8f9512 input_common: Enable virtual amiibo driver 2022-10-02 12:32:26 -05:00
Andrea Pappacoda
6a2efdda2f chore: make yuzu REUSE compliant
[REUSE] is a specification that aims at making file copyright
information consistent, so that it can be both human and machine
readable. It basically requires that all files have a header containing
copyright and licensing information. When this isn't possible, like
when dealing with binary assets, generated files or embedded third-party
dependencies, it is permitted to insert copyright information in the
`.reuse/dep5` file.

Oh, and it also requires that all the licenses used in the project are
present in the `LICENSES` folder, that's why the diff is so huge.
This can be done automatically with `reuse download --all`.

The `reuse` tool also contains a handy subcommand that analyzes the
project and tells whether or not the project is (still) compliant,
`reuse lint`.

Following REUSE has a few advantages over the current approach:

- Copyright information is easy to access for users / downstream
- Files like `dist/license.md` do not need to exist anymore, as
  `.reuse/dep5` is used instead
- `reuse lint` makes it easy to ensure that copyright information of
  files like binary assets / images is always accurate and up to date

To add copyright information of files that didn't have it I looked up
who committed what and when, for each file. As yuzu contributors do not
have to sign a CLA or similar I couldn't assume that copyright ownership
was of the "yuzu Emulator Project", so I used the name and/or email of
the commit author instead.

[REUSE]: https://reuse.software

Follow-up to b2eb103829
2022-07-27 12:53:49 +02:00
german77
76b18ad549 input_common: Add camera driver 2022-07-23 19:38:42 -05:00
Narr the Reg
f27e097244 input_common: Map sticks correctly when mapped sideways 2022-03-21 19:39:33 -06:00
ameerj
e7bb6ec32e input_common: Reduce unused includes 2022-03-20 02:25:09 -04:00
Lioncash
cec9e4ec77 input_common/input_mapping: Remove const from return value
Top-level const on a return by value can inhibit move semantics, and is
unnecessary.
2022-01-24 11:39:20 -05:00
Lioncash
1bd76dcb77 input_common/main: Pass MappingData by const reference in callbacks
Avoids creating unnecessary 168 byte copies per callback invocation.
2022-01-24 11:31:43 -05:00
Narr the Reg
7b56b2cab6 input_common: Fully implement UDP controllers 2021-11-26 15:46:36 -06:00
german77
b8b849dc2e input_common: Move button names to the frontend 2021-11-24 20:30:28 -06:00
german77
6032358402 input_common: Allow keyboard to be backwards compatible 2021-11-24 20:30:28 -06:00
german77
ebfe40dec8 core/hid: Improve accuracy of the keyboard implementation 2021-11-24 20:30:28 -06:00
german77
9f91335a71 kraken: Address comments from review
start lion review
2021-11-24 20:30:26 -06:00
german77
d1bac9024d settings: Fix mouse and keyboard mappings 2021-11-24 20:30:25 -06:00
german77
b3f59b4407 kraken: Address comments from review
review fixes
2021-11-24 20:30:25 -06:00
german77
6774c7988b configuration: Migrate controller settings to emulated controller 2021-11-24 20:30:25 -06:00
german77
0292fe0198 kraken: Fix errors from rebase and format files 2021-11-24 20:30:24 -06:00
german77
66cf94709a core/hid: Add output devices 2021-11-24 20:30:24 -06:00
german77
547a1e6dc9 input_common: Rewrite main and add the new drivers 2021-11-24 20:30:23 -06:00
german77
00d3c058c5 input_common: Rewrite keyboard 2021-11-24 20:30:22 -06:00
german77
1d0e9b62da input_common: Move touch and analog from button. Move udp protocol 2021-11-24 20:30:22 -06:00
ameerj
d7977be416 general: Update style to clang-format-12 2021-09-24 15:52:05 -04:00
german77
1b060a47b2 UI: Relocate tas menu and add brief description 2021-09-18 23:23:03 +02:00
german77
bba1ab83d6 config: Move TAS options to it's own menu 2021-09-18 23:22:30 +02:00
MonsterDruide1
31068a63a9 input_common/tas: Base playback & recording system
The base playback system supports up to 8 controllers (specified by `PLAYER_NUMBER` in `tas_input.h`), which all change their inputs simulataneously when `TAS::UpdateThread` is called.

The recording system uses the controller debugger to read the state of the first controller and forwards that data to the TASing system for recording. Currently, this process sadly is not frame-perfect and pixel-accurate.

Co-authored-by: Naii-the-Baf <sfabian200@gmail.com>
Co-authored-by: Narr-the-Reg <juangerman-13@hotmail.com>
2021-09-18 23:22:00 +02:00
german77
32e0572a68 input_common: Improve SDL joystick and hide toggle option 2021-08-07 23:11:23 -05:00
german77
77db68f9e3 input_common: Fix build with sdl disabled 2021-07-10 20:02:02 -05:00
german77
b79310def9 input_common: Implement SDL motion 2021-05-15 08:56:58 -05:00
bunnei
eba344f859 Merge pull request #4937 from german77/multiUDP
InputCommon: Add multiple udp server support
2020-12-01 11:47:37 -08:00
german
56a8fee35a Implement full mouse support 2020-11-25 23:59:30 -06:00
german
6708e0ec0e Add multiple udp server support 2020-11-25 23:44:41 -06:00
Morph
ad3905fe27 input_common: Add VibrationDevice and VibrationDeviceFactory
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-15 23:33:20 -05:00
Morph
b29a52982a configure_input_player: Change "Defaults" button behavior
RestoreDefaults() now restores the selected devices' mappings using UpdateMappingWithDefaults().
This allows us to move the keyboard mapping from RestoreDefaults() to UpdateMappingWithDefaults().
2020-11-15 23:33:20 -05:00
Morph
ad9a909bc7 configure_input_player: Implement input exclusivity and persistence
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-15 23:33:19 -05:00
Lioncash
d44d662529 input_common/CMakeLists: Make some warnings errors
Makes the input_common code warnings consistent with the rest of the
codebase.
2020-10-15 19:37:51 -04:00
german
ef4f095aae Add random motion input to keyboard 2020-09-25 17:59:52 -05:00
german
9f70da1a9b Add automap feature for GC adapter 2020-09-18 16:51:16 -05:00
german
82eb4be33b Add cemu hook changes related to PR #4609 2020-09-04 21:48:13 -05:00
FearlessTobi
01dbe3a624 Address review comments and fix code compilation 2020-08-29 20:56:51 +02:00
FearlessTobi
2903f0f7ce yuzu: Add motion and touch configuration 2020-08-29 18:56:34 +02:00
Lioncash
affbf8e188 input_common: Eliminate most global state
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.
2020-08-27 16:11:17 -04:00
Morph
4ca910101f input_common/main: Add "/Mouse" to the display name 2020-08-26 22:41:51 -04:00
Morph
24ce544120 Address feedback 2020-08-26 02:32:32 -04:00