ReinUsesLisp
67dd8466b3
gc_adapter: Disable MSVC nonstandard extension warning on libusb.h
Pragma disable zero-sized array nonstandard extension warning on MSVC.
5 years ago
Lioncash
14d5340a9d
gc_adapter: Make DeviceConnected() a const member function
This doesn't modify instance state, so it can be made const.
5 years ago
Morph
f3417b01e1
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.
5 years ago
FearlessTobi
ee199ead59
Address second batch of reviews
5 years ago
FearlessTobi
01dbe3a624
Address review comments and fix code compilation
5 years ago
FearlessTobi
2903f0f7ce
yuzu: Add motion and touch configuration
6 years ago
Lioncash
56d39caa1d
sdl_impl: Reduce allocations in GetButtonMappingForDevice()
These maps can be constexpr arrays of std::pair.
5 years ago
Lioncash
eb2ab15bdb
sdl_impl: Make use of std::move on std::string where applicable
Avoids redundant copies.
5 years ago
Lioncash
285e3386e2
sdl_impl: Make use of insert_or_assign() where applicable
Avoids churning ParamPackage instances.
5 years ago
Lioncash
3413c8c046
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.
5 years ago
Lioncash
1338c58d37
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.
5 years ago
Lioncash
4dc59a4b64
sdl_impl: Mark FromEvent() as a const member function
This doesn't modify internal member state, so it can be marked as const.
5 years ago
Lioncash
0322ffa4fd
input_common/main: Remove unnecessary headers
5 years ago
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.
5 years ago
german
f327977dfa
Fix orientation errors and improve drift correction
5 years ago
german
dbf0608afd
Address comments
5 years ago
german
0e11d1c09a
Implement a basic class for motion devices
5 years ago
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.
5 years ago
Morph
4ca910101f
input_common/main: Add "/Mouse" to the display name
5 years ago
Morph
5e4f03f663
input_common: Fix directional deadzone values
The hardware tested value is 0.5 which translates to SHRT_MAX / 2
5 years ago
Morph
24ce544120
Address feedback
5 years ago
Morph
34a209d15c
Project Mjölnir: Part 1
Co-authored-by: James Rowe <jroweboy@gmail.com>
Co-authored-by: Its-Rei <kupfel@gmail.com>
6 years ago
Lioncash
fa4a1718a7
gc_poller: Resolve compilation warnings on MSVC
We just need to make our intentional implicit truncations explicit.
5 years ago
Lioncash
78ddcbe3ba
General: Tidy up clang-format warnings part 2
5 years ago
ameerj
5d4750541b
Remove UI changes
This PR is now only the Analog devices handling the range value defaulting at 100%
5 years ago
ameerj
ac3cdc1741
Add range slider functionality for gc adapter
6 years ago
Ameer
6afee6b0c8
undo unnecessary newlines, slider range 50-150
6 years ago
Ameer
1eb1eff48c
Add range slider for analog sticks
6 years ago
Brian J. Tarricone
f637cfec64
GCAdapter: only join worker thread if running & joinable
6 years ago
Lioncash
5987e39f21
udp/client: Remove unused boost include
Also silences a deprecation warning from boost on Clang/GCC.
6 years ago
Lioncash
bc2f95ea67
gc_adapter: Resolve C++20 deprecation warning
6 years ago
Lioncash
6efd1a2675
gc_poller: Resolve -Wsign-compare warning
6 years ago
Lioncash
e94ad47152
gc_poller: Resolve -Wredundant-move warning
6 years ago
ameerj
bb2375ec9d
Fix axis thresholding while polling
axes were very sensitive when mapping controls.
6 years ago
ameerj
45584cf459
std::size_t where appropriate, make error message more clear if can't read
6 years ago
Ameer
05174770cc
Refactor adapter code
6 years ago
Ameer
2b38468a0b
Fix crash if gc configured but adapter not connected
6 years ago
Ameer
a8deadbb2b
input_common: drop unused libusb.h include
Remnant of an early implementation.
6 years ago
Jan Beich
cfc73b4188
input_common: make libusb private to gc_adapter
6 years ago
Lioncash
cb588c9ef1
udp: Silence a C++20 deprecation warning
C++20 deprecates using the = lambda capture to implicitly capture the
this pointer. Instead, we must specify it explicitly.
6 years ago
Lioncash
7c05493952
gc_poller: Mark GCButtonFactory::GetNextInput() as const
This doesn't modify class instance state.
6 years ago
Lioncash
340875a12f
gc_poller: Get rid of undefined behavior in Create()
Ensures that the function always has returns in all control paths.
6 years ago
Lioncash
ff47456e8b
gc_poller: Silence sign conversion warnings
6 years ago
Lioncash
1fe8261049
gc_adapter: Remove deprecated usage of = in lambda captures
It's deprecated in C++20 to use = to capture the this pointer.
Instead, we can simply pass this as an argument to the thread
constructor.
6 years ago
Lioncash
6b6d076f51
gc_adapter: Silence sign conversion warnings
6 years ago
Ameer
a885855ff4
Break out of scan loop if can't find adapter on first run
6 years ago
Jan Beich
64cab91fac
cmake: pass libusb include directory as well
In file included from src/input_common/gcadapter/gc_adapter.cpp:8:
src/./input_common/gcadapter/gc_adapter.h:11:10: fatal error: 'libusb.h' file not found
#include <libusb.h>
^~~~~~~~~~
6 years ago
Ameer
6e2876d7da
Address comments for better clarity/signed dev count
6 years ago
Ameer
0e21c24052
Add more libusb error checks
6 years ago
Ameer
f1790c7b34
Address PR feedback, fix axis button thresholding
6 years ago