Commit graph

568 commits

Author SHA1 Message Date
german77
78a8ed6290 input_common: Rewrite gc_adapter 2021-11-24 20:30:22 -06:00
german77
86a57fb096 input_common: Rewrite touch 2021-11-24 20:30:22 -06:00
german77
280342cd0a input_common: Rewrite mouse 2021-11-24 20:30:22 -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
german77
783c01771a input_common: Create input poller and mapping 2021-11-24 20:30:22 -06:00
german77
312dd2fb89 input_common: Create input_engine 2021-11-24 20:30:22 -06:00
Fernando S
0b63955efe Revert "input_common: Fix data race on GC implementation" 2021-10-23 23:32:16 +02:00
Fernando S
8eda2922b2 Merge pull request #6515 from german77/gc_thread_safe
input_common: Fix data race on GC implementation
2021-10-23 23:28:22 +02:00
ameerj
1dabf6d025 input_common: Fix VS2022 compilation errors 2021-10-20 01:21:59 -04:00
german77
cfa3acd4a5 input_common/sdl: Fix joystick range 2021-10-11 01:03:01 -05:00
bunnei
ceafd4f92c Merge pull request #6979 from german77/joycon_name
input_common: Add alternative string for joycons
2021-10-02 02:58:25 -07: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
d71f067db8 input_common/tas: Document the main class 2021-09-18 23:22:48 +02:00
german77
d552f84322 input_common/tas: Add swap controller 2021-09-18 23:22:42 +02:00
german77
368c9db4ee input_common/tas: overwrite file dialog 2021-09-18 23:22:42 +02:00
MonsterDruide1
1b67085cda input_common/tas: Fallback to simple update 2021-09-18 23:22:30 +02:00
german77
bba1ab83d6 config: Move TAS options to it's own menu 2021-09-18 23:22:30 +02:00
MonsterDruide1
cce0d58312 core: Hacky TAS syncing & load pausing
To keep the TAS inputs synced to the game speed even through lag spikes and loading zones, deeper access is required.

First, the `TAS::UpdateThread` has to be executed exactly once per frame. This is done by connecting it to the service method the game calls to pass parameters to the GPU: `Service::VI::QueueBuffer`.

Second, the loading time of new subareas and/or kingdoms (SMO) can vary. To counteract that, the `CPU_BOOST_MODE` can be detected: In the `APM`-interface, the call to enabling/disabling the boost mode can be caught and forwarded to the TASing system, which can pause the script execution if neccessary and enabled in the settings.
2021-09-18 23:22:20 +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
0cea589993 input_common: Enable steam controllers and 8 player support 2021-09-10 00:58:12 -05:00
german77
94028da35e input_common: Add alternative string for joycons 2021-09-06 22:20:19 -05:00
german77
134a2c23ac input_common: Disable sdl raw input mode 2021-08-12 13:17:07 -05:00
german77
32e0572a68 input_common: Improve SDL joystick and hide toggle option 2021-08-07 23:11:23 -05:00
Rodrigo Locatti
84bdc6969f input_common: Fix data race on GC implementation 2021-08-07 16:46:26 -05:00
bunnei
18a787b357 Merge pull request #6654 from german77/custom_threshold
input_common: Make button threshold customizable
2021-07-21 20:31:33 -04:00
bunnei
def3f59ed9 Merge pull request #6649 from german77/toggle_sdl
input_common: Support SDL toggle buttons
2021-07-20 20:35:20 -04:00
Nicolas Jallamion
d417596f27 input/sdl_impl: fix rumble support on DualSense. (#6683)
- value return can be different 0, is not error is normal, error is only -1.
2021-07-20 04:00:07 -04:00
bunnei
40a1066bf7 Merge pull request #6652 from lat9nq/cmd-vulkan-fixes
yuzu-cmd: Linux Vulkan fixes
2021-07-19 20:54:03 -04:00
german77
0fb8912834 input_common: Fix mouse panning behaivour 2021-07-16 18:57:29 -05:00
lat9nq
7a30ae6845 sdl_impl, emu_window: Remove clang ignore
Fixed upstream by
libsdl-org/SDL@25fc40b0bd
2021-07-16 15:43:12 -04:00
german77
9e0f89e081 input_common: Make button threshold customizable 2021-07-15 23:56:57 -05:00
bunnei
24f798804c Merge pull request #6579 from ameerj/float-settings
settings: Eliminate usage of float-point setting values
2021-07-15 18:03:11 -04:00
german77
f098c2163b input_common: Support SDL toggle buttons 2021-07-15 14:31:58 -05:00
german77
77db68f9e3 input_common: Fix build with sdl disabled 2021-07-10 20:02:02 -05:00
ameerj
4e2d71a8ce configure_input: Use u8 for mouse sensitivity 2021-07-08 23:24:31 -04:00
Ameer J
60e29dd3b0 Merge pull request #6539 from lat9nq/default-setting
general: Move most settings' defaults and labels into their definition
2021-07-08 14:46:31 -04:00
lat9nq
d9109a708b general: Code formatting improvements
Slight improvements to readability.

Dropped suggestions for string_view (settings.h:101), pass by value
(settings.h:82), reverting double to a float (config.cpp:316), and other
smaller ones, some out of scope.

Addresses review feedback.

Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>
2021-07-08 14:07:10 -04:00
Morph
64f22684d4 CMakeLists: Treat -Wsign-compare as an error on GCC/Clang
Treats (un)signed comparison mismatches as errors to be consistent with MSVC
2021-07-06 12:50:09 -04:00
bunnei
88cb6c26f3 Merge pull request #6537 from Morph1984/warnings
general: Enforce multiple warnings in MSVC
2021-07-05 17:09:23 -07:00
german77
cf1280874f input_common: Add missing modifier callback to analog from button 2021-07-05 11:39:42 -05:00
lat9nq
3352742284 core, input_common: Miscellaneous fixes
bcat: Fix settings access

telemetry_session: Fix settings accesses

So this is what I get for testing with the web service disabled.

touch_from_button: Fix settings access for clang
2021-06-28 20:56:17 -04:00
lat9nq
794c444285 general: Make most settings a BasicSetting
Creates a new BasicSettings class in common/settings, and forces setting
a default and label for each setting that uses it in common/settings.
Moves defaults and labels from both frontends into common settings.
Creates a helper function in each frontend to facillitate reading the
settings now with the new default and label properties.

Settings::Setting is also now a subclass of Settings::BasicSetting. Also
adds documentation for both Setting and BasicSetting.
2021-06-28 17:32:17 -04:00
Morph
1917128312 input_common: Remove #pragma warning directives for external headers 2021-06-28 14:20:25 -04:00
Morph
b6c7707fe9 input_common: Enforce C4242 2021-06-28 14:20:25 -04:00
Chloe
a9a9167009 Add missing includes (#6521)
* Add missing includes

* Add array
2021-06-24 03:24:17 -04:00
Rodrigo Locatti
65df2a2ba0 input_common/mouse_input: Fix data race
Fix data race using std::jthread and std::stop_token.
2021-06-22 02:31:39 -03:00
bunnei
78d9caa5df Merge pull request #6407 from lat9nq/fix-libusb-2
cmake: Use autotools for libusb linking generally on GNU, and cleanup
2021-06-10 23:35:30 -07:00
bunnei
65505640b9 Merge pull request #6389 from german77/Analog_button_fix
input_common: Analog button, use time based position
2021-06-03 21:06:38 -07:00