Jordan Woyak
aabe8d2ccd
ControllerInterface: Don't consider the empty string a valid unique ID.
2020-01-13 16:50:58 -06:00
Jordan Woyak
ac907ef977
ControllerInterface: Combine evdev devices with the same unique ID.
...
This works around Linux drivers for DS4 (Playstation 4) controllers splitting the device into three separate event nodes which makes configuration difficult.
To prevent collisions of input names in combined devices more descriptive names are now used when possible.
2020-01-13 16:50:56 -06:00
Scott Mansell
a8c33f4ef6
Fix trailing whitespace
2020-01-07 12:52:05 +13:00
Scott Mansell
21528c3e72
Document the evdev "interesting" heuristic
...
Was checking over this old code, and saw a comment calling me out for a lack of documentation.
It might be half a decade late, but better late then never.
2020-01-07 12:46:24 +13:00
Pierre Bourdon
5c996dec89
DualShockUDPClient: downgrade spurious NOTICE_LOGs
2019-12-23 18:36:18 +01:00
OatmealDome
ef32a10d69
InputCommon: Decouple ButtonManager and Touchscreen from Android
...
Changes were also made for codestyle compliance.
2019-11-28 15:20:51 -05:00
Anthony
155016531f
Merge pull request #8439 from JosJuice/android-native-motion-controls
...
Android: Native motion controls
2019-11-27 15:40:43 -08:00
Léo Lam
ec895f544c
Merge pull request #8486 from lioncash/dualshock
...
InputCommon/DualShockUDPClient: Minor cleanup
2019-11-24 00:46:19 +01:00
Lioncash
334e2768f5
InputCommon/DualShockUDPClient: Use an alias for the clock type
...
Makes code slightly less verbose without exposing the whole chrono
header to the current source file.
2019-11-22 17:06:10 -05:00
Lioncash
db9e592765
InputCommon/DualShockUDPClient: Use deduction guides for lock_guard
...
With C++17, we can use template deduction guides provided by the
standard library. This allows the omission of the mutex type itself.
2019-11-22 17:06:10 -05:00
Lioncash
278d03f737
InputCommon/DualShockUDPClient: Make use of std::array where applicable
...
Provides the same semantics of a C array, but is much nicer to work
with.
Notably, it makes all cases of performing comparisons with said arrays
significantly less reading-involved.
2019-11-22 17:06:07 -05:00
Lioncash
67097b4574
InputCommon/DualShockUDPClient: Relocate settings to top of source file
...
This is a small namespace, so we can move it to the top of the file to
get it out of the way of everything else.
2019-11-22 15:56:29 -05:00
Lioncash
4488719a76
InputCommon/DualShockUDPClient: In-class initialize members where applicable
...
Deduplicates members within the constructor's initializer list.
2019-11-22 15:56:29 -05:00
Lioncash
544d6cbe52
InputCommon/DualShockUDPClient: Add missing header guard
...
Prevents potential inclusion issues from occurring.
2019-11-22 15:56:26 -05:00
Lioncash
e8edc49bbe
InputCommon: Make use of fmt where applicable
...
Continues the migration over to fmt
2019-11-22 14:38:26 -05:00
JosJuice
c8b8a60033
Android: Let WiimoteEmu know whether we have accelerometer/gyroscope
2019-11-20 20:13:36 +01:00
JosJuice
b143df91be
Android: Native motion controls
2019-11-20 18:22:20 +01:00
Jordan Woyak
0c57887839
evdev: fix bad integer division.
2019-11-10 10:10:37 -06:00
Jordan Woyak
1180c231a6
InputCommon: Detect when evdev exposes acceleration/gyroscope data.
2019-11-09 13:34:29 -06:00
rlnilsen
da1f153b47
Rename all instances of "CemuhookUDPServer"/"UDPServer" to "DualShockUDPClient"/"DSUClient".
2019-10-27 16:05:22 +01:00
rlnilsen
5ff79499a5
UDPServer: Add configuration UI.
...
Accessed through button "Alternate Input Sources" in the "Controller Settings" dialog.
2019-10-26 02:20:18 +02:00
rlnilsen
4cb3baba5c
Add support for motion controllers via the CemuHook controller input protocol.
...
This is done by:
1) Implementing said protocol in a new controller input class CemuHookUDPServer.
2) Adding functionality in the WiimoteEmu class for pushing that motion input to the emulated Wiimote and MotionPlus.
3) Suitably modifying the UI for configuring an Emulated Wii Remote.
2019-10-26 02:19:53 +02:00
Connor McLaughlin
48ca2c6f2e
Merge pull request #8233 from JosJuice/stringutil-string-view
...
StringUtil: Use std::string_view more
2019-08-09 23:39:01 +10:00
Lioncash
37d643c7d3
InputCommon/DInputJoystick: Correct force-feedback flag testing
...
Introduced in a995e2f5ba
We need to be performing a bitwise AND on the flags and not a logical
AND, otherwise we could end up counting device objects that don't
support forced feedback.
2019-08-02 10:26:44 -04:00
JosJuice
a2a1e04fc9
StringUtil: Use std::string_view more
2019-07-23 14:49:12 +02:00
Lioncash
ec60027f56
InputCommon: Use nested namespace specifiers where applicable
2019-06-17 16:51:41 -04:00
Connor McLaughlin
bed2d66bed
Merge pull request #8117 from weihuoya/threaded_env
...
android: get java env from thread local storage
2019-06-08 20:42:15 +10:00
Lioncash
0263435050
ControllerInterface/Device: Make DetectInput() a const member function
...
This doesn't actually modify object instance state, so it can be made
const.
2019-05-29 19:23:54 -04:00
Lioncash
27346fee8a
ControllerInterface/Device: Take vector by const reference in DetectInput()
...
The vector is only ever queryied and it's contents aren't modified, so
there's no reason to take the vector by value. We can take a constant
reference to it to avoid unnecessary allocating.
2019-05-29 19:12:21 -04:00
Lioncash
246e2a77ce
ControllerInterface/Device: std::move strings in constructor where applicable
...
Allows callers to move std::string values into the constructor,
potentially avoiding copies.
2019-05-29 18:46:49 -04:00
Lioncash
1355b43fd2
ControllerInterface/Device: Use std::string_view where applicable
...
In these cases, the given string is only ever compared against other
string, so std::string can be turned into a std::string_view to allow
non-allocating inputs.
2019-05-29 18:42:24 -04:00
weihuoya
0dec8feadb
android: thread local env
2019-05-29 20:22:26 +08:00
spycrab
7eaece8814
InputCommon/Device.cpp: Add missing include
2019-05-08 21:02:26 +02:00
spycrab
98d808ab71
InputCommon/DInput.h: Add missing include
2019-05-08 21:01:46 +02:00
Techjar
ff972e3673
Reformat repo to clang-format 7.0 rules
2019-05-06 18:48:04 +00:00
Léo Lam
ab9ece9bca
Replace MathUtil::Clamp with std::clamp
2019-05-04 23:12:17 +02:00
Jordan Woyak
8c1310d1d1
ControllerInterface/DInput: Optimize cursor position updating.
2019-04-20 09:25:11 -05:00
Jordan Woyak
be897b41a7
ControllerInterface: Rename full surface analog inputs to be more visually dissimilar from their underlying inputs. e.g. "Full Axis X+".
2019-04-13 08:45:19 -05:00
JMC47
75e74315e6
Merge pull request #7689 from jordan-woyak/sdl-improve
...
ControllerInterface: SDL cleanups/fixes
2019-04-06 14:53:51 -04:00
Jordan Woyak
2b6d718636
InputCommon: Fix Win32 init race.
2019-03-31 07:46:58 -05:00
Jordan Woyak
eadbdd6bc3
ControllerInterface/Win32: Prevent devcies from losing their "id" on a hotplug event.
2019-03-29 09:04:16 -05:00
Michael M
d26c1ce24d
Add hotplug support to DInput and XInput controller backends
2019-03-29 08:01:40 -05:00
Michael M
92ca6e124e
Add ControllerInterface::Win32 to wrap XInput and DInput
2019-03-29 08:01:39 -05:00
spycrab
672b582bec
Merge pull request #7918 from spycrab/iokit_refactor
...
InputCommon/OSX: Refactor IOKit controller interface
2019-03-22 21:18:27 +01:00
spycrab
80fd01c3c3
InputCommon/OSX: Refactor IOKit controller interface
2019-03-22 14:04:30 +01:00
Tilka
0a1aacb5d0
Merge pull request #7906 from jordan-woyak/leak-fix
...
DolphinQt/InputCommon: Fix a few memory leaks.
2019-03-21 23:26:54 +00:00
Jordan Woyak
b53636827b
ControllerInterface: Unbreak DirectInput POV Hats having bad values on init.
2019-03-19 16:05:49 -05:00
Jordan Woyak
725d34b2f0
DolphinQt/InputCommon: Fix a few memory leaks.
2019-03-17 18:31:41 -05:00
Jordan Woyak
0bdfa19650
ControllerInterface: SDL: Replace unclear bool parameter with enum class.
2019-03-17 08:53:53 -05:00
Jordan Woyak
4fb68c530b
ControllerInterface: SDL cleanup and FF effect fixes.
2019-03-17 08:53:13 -05:00