Commit graph

32 commits

Author SHA1 Message Date
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
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
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
783c01771a input_common: Create input poller and mapping 2021-11-24 20:30:22 -06:00
german77
d552f84322 input_common/tas: Add swap controller 2021-09-18 23:22:42 +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
german
56a8fee35a Implement full mouse support 2020-11-25 23:59:30 -06:00
german
82eb4be33b Add cemu hook changes related to PR #4609 2020-09-04 21:48:13 -05:00
german
876e6fc255 Include HID and configuration changes related to motion 2020-09-04 21:48:03 -05:00
FearlessTobi
ee199ead59 Address second batch of reviews 2020-08-30 00:43:25 +02: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
0322ffa4fd input_common/main: Remove unnecessary headers 2020-08-28 19:23:19 -04:00
Lioncash
72d5a883a1 input_common/main: Remove unimplemented prototype
I forgot to remove this in the rebase when removing most of the global
variables within the input common codebase.
2020-08-28 19:11:17 -04: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
24ce544120 Address feedback 2020-08-26 02:32:32 -04:00
Morph
34a209d15c Project Mjölnir: Part 1
Co-authored-by: James Rowe <jroweboy@gmail.com>
Co-authored-by: Its-Rei <kupfel@gmail.com>
2020-08-26 02:32:32 -04:00
Ameer
5479427335 Tidy up the pointers, use pair over tuple where appropriate 2020-06-21 23:56:56 -04:00
Ameer
eddf2d0f4e Singleton GC Adapter class, remove globals, fix naming convention
Fix clang formatting

Manual fix for configure_input_player formatting

Add missing lib usb cmake command
2020-06-21 21:17:07 -04:00
Ameer
77ae7fe5dd Clang Formatting 2020-06-21 15:31:57 -04:00
Ameer
dbe1ad4fe4 GC Adapter Implementation 2020-06-21 12:36:28 -04:00
James Rowe
a15f8a9936 Input: Remove global variables from SDL Input
Changes the interface as well to remove any unique methods that
frontends needed to call such as StartJoystickEventHandler by
conditionally starting the polling thread only if the frontend hasn't
started it already. Additionally, moves all global state into a single
SDLState class in order to guarantee that the destructors are called in
the proper order
2019-03-02 19:09:34 +01:00
Tobias
ab39d25ff0 Port #4141 from citra: Joystick hotplug support (#1275)
* Joystick hotplug support (#4141)

* use SDL_PollEvent instead of SDL_JoystickUpdate

Register hot plugged controller by GUID if they were configured in a previous session

* Move SDL_PollEvent into its own thread

* Don't store SDLJoystick pointer in Input Device; Get pointer on each GetStatus call

* Fix that joystick_list gets cleared after SDL_Quit

* Add VirtualJoystick for InputDevices thats never nullptr

* fixup! Add VirtualJoystick for InputDevices thats never nullptr

* fixup! fixup! Add VirtualJoystick for InputDevices thats never nullptr

* Remove SDL_GameController, make SDL_Joystick* unique_ptr

* fixup! Remove SDL_GameController, make SDL_Joystick* unique_ptr

* Adressed feedback; fixed handling of same guid reconnects

* fixup! Adressed feedback; fixed handling of same guid reconnects

* merge the two joystick_lists into one

* make SDLJoystick a member of VirtualJoystick

* fixup! make SDLJoystick a member of VirtualJoystick

* fixup! make SDLJoystick a member of VirtualJoystick

* fixup! fixup! make SDLJoystick a member of VirtualJoystick

* SDLJoystick: Addressed review comments

* Address one missed review comment
2018-09-10 21:29:59 -04:00
muemart
a884f3d03e Adding meumart's Citra SDL Joystick support. Citra PR #3116 2018-01-15 20:02:30 -05:00
James Rowe
df206639cf Merge pull request #2861 from wwylele/motion-refactor
Refactor MotionEmu into a InputDevice
2017-08-19 23:43:01 -06:00
Dave Leaver
4c281049aa Fix Spelling/English mistakes 2017-08-14 09:15:39 +12:00
wwylele
d500f79b8e move MotionEmu from core/frontend to input_common as a InputDevice 2017-08-11 11:05:08 +03:00
wwylele
ffb582ff3b InputCommon: add AnalogFromButton 2017-03-01 23:30:57 +02:00
wwylele
189063ac2d InputCommon: add Keyboard 2017-03-01 23:30:57 +02:00