Commit Graph

216 Commits

Author SHA1 Message Date
3f6d83b27c Merge pull request #4594 from german77/MotionHID
hid/configuration: Implement motion controls to HID
2020-09-17 12:39:01 -07:00
bc8ace9917 gc_adapter: Disable MSVC nonstandard extension warning on libusb.h
Pragma disable zero-sized array nonstandard extension warning on MSVC.
2020-09-14 19:38:08 -03:00
c715fc4c5e gc_adapter: Make DeviceConnected() a const member function
This doesn't modify instance state, so it can be made const.
2020-09-07 02:49:13 -04:00
797564599f Minor cleanup 2020-09-05 09:42:21 -04:00
6ee8eab670 Add cemu hook changes related to PR #4609 2020-09-04 21:48:13 -05:00
0774b17846 Remove RealMotionDevice 2020-09-04 21:48:13 -05:00
ff679f3d17 Include HID and configuration changes related to motion 2020-09-04 21:48:03 -05:00
3b0fe38e86 Merge pull request #4583 from lioncash/trunc
gc_poller: Resolve compilation warnings on MSVC
2020-09-03 20:23:33 -04:00
45ecd601be input_common/motion_input: Make use of Common::PI constant
Also amend the copyright notice to yuzu's instead of Dolphin's, which was mistakenly copy-pasted from another file.
2020-09-02 11:58:15 -04:00
f64917a852 Merge pull request #4570 from german77/motionInput
input_common: Add a basic class for motion devices
2020-09-02 11:09:18 -04:00
3dcccabd1d Merge pull request #4382 from FearlessTobi/port-udp-config
yuzu: Add motion and touch configuration from Citra
2020-09-01 13:56:37 -04:00
d1e1ea0fef Address second batch of reviews 2020-08-30 00:43:25 +02:00
d176feffad Address review comments and fix code compilation 2020-08-29 20:56:51 +02:00
e6bd1fd1b8 yuzu: Add motion and touch configuration 2020-08-29 18:56:34 +02:00
69fa6b4906 sdl_impl: Reduce allocations in GetButtonMappingForDevice()
These maps can be constexpr arrays of std::pair.
2020-08-28 21:24:17 -04:00
f2a680ca89 sdl_impl: Make use of std::move on std::string where applicable
Avoids redundant copies.
2020-08-28 21:14:54 -04:00
e92164e6a0 sdl_impl: Make use of insert_or_assign() where applicable
Avoids churning ParamPackage instances.
2020-08-28 21:13:26 -04:00
f3ac088345 sdl_impl: Prevent type truncation in BuildAnalogParamPackageForButton() default arguments
We need to add the 'f' suffix to make the right hand side a float and
not a double.
2020-08-28 21:08:08 -04:00
2e2dde2f95 sdl_impl: Simplify make_tuple call
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-28 21:04:18 -04:00
2680526e6b sdl_impl: Mark FromEvent() as a const member function
This doesn't modify internal member state, so it can be marked as const.
2020-08-28 20:58:49 -04:00
98f5d8a713 input_common/main: Remove unnecessary headers 2020-08-28 19:23:19 -04:00
4b9b203c09 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
1be18dc110 Fix orientation errors and improve drift correction 2020-08-27 17:19:21 -05:00
e6fc3b5662 Address comments 2020-08-27 17:19:21 -05:00
2d207ec609 Implement a basic class for motion devices 2020-08-27 17:19:21 -05:00
9e1b0af259 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
8ffc491546 input_common/main: Add "/Mouse" to the display name 2020-08-26 22:41:51 -04:00
de79897f04 input_common: Fix directional deadzone values
The hardware tested value is 0.5 which translates to SHRT_MAX / 2
2020-08-26 02:32:32 -04:00
efa0b7a056 Address feedback 2020-08-26 02:32:32 -04:00
f0fac0c7fb 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
f60d5aac3e gc_poller: Resolve compilation warnings on MSVC
We just need to make our intentional implicit truncations explicit.
2020-08-25 23:03:12 -04:00
b724a4d90c General: Tidy up clang-format warnings part 2 2020-08-13 14:19:08 -04:00
d6672501ac Remove UI changes
This PR is now only the Analog devices handling the range value defaulting at 100%
2020-08-10 12:46:14 -04:00
9c6ae697f5 Add range slider functionality for gc adapter 2020-08-10 12:46:14 -04:00
8928aa3008 undo unnecessary newlines, slider range 50-150 2020-08-10 12:46:14 -04:00
ed51c2abda Add range slider for analog sticks 2020-08-10 12:46:14 -04:00
d840ed90e1 GCAdapter: only join worker thread if running & joinable 2020-07-26 14:54:02 -07:00
4524e1bd54 Merge pull request #4418 from lioncash/udp-warn
udp/client: Remove unused boost include
2020-07-25 21:50:37 -07:00
1a7cf26884 udp/client: Remove unused boost include
Also silences a deprecation warning from boost on Clang/GCC.
2020-07-25 03:42:03 -04:00
ac7e4e2cab gc_adapter: Resolve C++20 deprecation warning 2020-07-25 03:38:22 -04:00
04699c366b gc_poller: Resolve -Wsign-compare warning 2020-07-25 03:37:22 -04:00
e19972dfc4 gc_poller: Resolve -Wredundant-move warning 2020-07-25 03:35:40 -04:00
68d6d3e173 Fix axis thresholding while polling
axes were very sensitive when mapping controls.
2020-07-19 11:49:26 -04:00
1e7bed0a45 std::size_t where appropriate, make error message more clear if can't read 2020-07-17 12:10:32 -04:00
94f5f29573 Refactor adapter code 2020-07-16 13:00:04 -04:00
93fe982a0c Rebase to master 2020-07-14 13:04:02 -04:00
ab65de2f96 Fix crash if gc configured but adapter not connected 2020-07-14 11:23:10 -04:00
393cdb15f5 Merge pull request #4314 from lioncash/input-warn
gcadapter: Tidy up compiler warnings
2020-07-14 10:20:12 -04:00
edb291b3be Merge pull request #4315 from lioncash/udp-warn
udp: Silence a C++20 deprecation warning
2020-07-14 09:33:16 -04:00
b284c43385 input_common: drop unused libusb.h include
Remnant of an early implementation.
2020-07-14 01:50:34 +00:00