Commit Graph

1415 Commits

Author SHA1 Message Date
e7400cafd2 InputCommon: XInput cleanups. 2020-02-08 15:51:02 -06:00
86e8745169 InputCommon: Expose XInput battery level as an input. 2020-02-08 15:03:56 -06:00
e8152b700f InputCommon: Allow controller settings specified with input expresions. 2020-02-08 14:01:55 -06:00
0491831483 Merge pull request #8592 from phcoder/devid
ButtonManager: Fix handling of empty device id.
2020-02-02 16:52:12 +01:00
69ee15e5ef Merge pull request #8478 from jordan-woyak/dsu-client-cleanup
ControllerInterface/DSUClient: Minor cleanup.
2020-02-01 11:29:29 +10:00
02c5d292fa ButtonManager: Fix handling of empty device id.
Device id is "" on ChromeOS when using gamepad
2020-01-29 02:47:18 +01:00
b92f6480a0 InputCommon: Make "Cursor" inputs aware of the rendered aspect ratio. 2020-01-24 09:20:41 -06:00
a61dff67da InputCommon: List IMUAccelerometer's Up/Down inputs first for consistency. 2020-01-18 13:56:11 -06:00
6106f780a7 ControllerInterface/DSUClient: Eliminate m_accl/m_gyro state by accessing the pad data directly like every other input. 2020-01-13 17:35:33 -06:00
eacbff76dd Merge pull request #8474 from jordan-woyak/dsu-battery
ControllerInterface: Exposse DSU client battery level as an input.
2020-01-13 18:30:53 -05:00
e2d5c92c76 ControllerInterface: Remove and re-add device when combining nodes. 2020-01-13 16:50:58 -06:00
aabe8d2ccd ControllerInterface: Don't consider the empty string a valid unique ID. 2020-01-13 16:50:58 -06:00
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
2b9fa0597a ControllerInterface: Minor DSU client device cleanups. 2020-01-13 16:32:02 -06:00
f0534cabc6 ControllerInterface: Exposse DSU client battery level as an input. 2020-01-13 16:29:24 -06:00
a8c33f4ef6 Fix trailing whitespace 2020-01-07 12:52:05 +13:00
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
6e549bb668 InputConfig::LoadConfig(): Convert num[] to an array of std::string_view.
NOTE: The explicit std::string() conversions later are needed. Otherwise,
gcc-9.2.0 throws all sorts of errors because it can't find a matching
operator+() function.
2019-12-29 23:45:02 -05:00
6fcb1c6c46 Add an ARM64 target to Visual Studio projects 2019-12-28 19:20:41 +10:00
5c996dec89 DualShockUDPClient: downgrade spurious NOTICE_LOGs 2019-12-23 18:36:18 +01:00
dd23a1ee79 Update VS projects/solutions to VS2019 2019-11-30 13:42:52 +10:00
ef32a10d69 InputCommon: Decouple ButtonManager and Touchscreen from Android
Changes were also made for codestyle compliance.
2019-11-28 15:20:51 -05:00
155016531f Merge pull request #8439 from JosJuice/android-native-motion-controls
Android: Native motion controls
2019-11-27 15:40:43 -08:00
ec895f544c Merge pull request #8486 from lioncash/dualshock
InputCommon/DualShockUDPClient: Minor cleanup
2019-11-24 00:46:19 +01:00
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
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
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
a06da596e5 Merge pull request #8485 from lioncash/imu
InputCommon/IMU*: Remove unnecessary includes
2019-11-22 22:31:57 +01:00
af37d09b0f Merge pull request #8484 from lioncash/input-func
InputCommon/FunctionExpression: Minor cleanup
2019-11-22 22:31:31 +01:00
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
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
544d6cbe52 InputCommon/DualShockUDPClient: Add missing header guard
Prevents potential inclusion issues from occurring.
2019-11-22 15:56:26 -05:00
91993b46d9 InputCommon/IMU*: Remove unnecessary includes
Trims out unnecessary includes to avoid unnecessary header dependencies.

This also resolves indirect inclusions of <optional> within
IMUAccelerometer.h and IMUGyroscope.h
2019-11-22 15:41:38 -05:00
814fd165af InputCommon/FunctionExpression: Use Yoda conditions, we do not
The general convention in the codebase is to compare the non-constant
value/string with the constant value/string, not the other way around.
2019-11-22 15:36:18 -05:00
1f6077922b InputCommon/FunctionExpression: Remove unnecessary 'else' in MakeFunctionExpression()
Given all conditional bodies only contain a return, the use of else here
isn't necessary.

This has the benefit of consistently vertically aligning the names.
2019-11-22 15:36:18 -05:00
10fea99d80 InputCommon/FunctionExpression: Make MakeFunctionExpression() take a std::string_view
There's nothing within this function that requires a copy of the string
to be made, so we can make use of a non-owning view
2019-11-22 15:36:18 -05:00
ddf8abf507 InputCommon/FunctionExpression: Remove unused LOOP_MAX_REPS constant
This isn't used anywhere in the translation unit, so we can remove it.
2019-11-22 15:36:18 -05:00
64bc6f53fd InputCommon/FunctionExpression: Remove cyclical include
This header was including itself, which is likely not intended.
2019-11-22 15:36:18 -05:00
cb8fbe872e InputCommon/FunctionExpression: Collapse namespaces
Since we target C++17, we can collapse the namespaces into a single
declaration specifier.
2019-11-22 15:36:14 -05:00
6586ecc7a8 InputCommon/FunctionExpression: include <algorithm>
std::min/std::max are used within this translation unit, so it needs to
be included to prevent potential compilation failures.
2019-11-22 14:41:13 -05:00
e8edc49bbe InputCommon: Make use of fmt where applicable
Continues the migration over to fmt
2019-11-22 14:38:26 -05:00
c8b8a60033 Android: Let WiimoteEmu know whether we have accelerometer/gyroscope 2019-11-20 20:13:36 +01:00
b143df91be Android: Native motion controls 2019-11-20 18:22:20 +01:00
fe39e1e6d8 Merge pull request #8440 from rlnilsen/motion-input-tweaks
Motion Input enhancements
2019-11-15 14:08:45 +01:00
913cb08066 Merge pull request #8456 from jordan-woyak/input-gate-race-fix
InputCommon: Make the "input gate" not racy.
2019-11-11 10:59:49 +10:00
0c57887839 evdev: fix bad integer division. 2019-11-10 10:10:37 -06:00
1180c231a6 InputCommon: Detect when evdev exposes acceleration/gyroscope data. 2019-11-09 13:34:29 -06:00
85ceb37ccd InputCommon: Make the "input gate" not racey. 2019-11-06 16:31:02 -06:00
f7a50545e3 Motion Input: Add "enable" checkbox for motion controlled cursor. 2019-11-03 11:56:01 +01:00
d67a2304b0 Input: Add optional "enable" setting to the ControlGroup class.
The setting is exposed as a check box in the QGroupBox instance that visualises the ControlGroup instance.
The setting is saved under "[control group name]/Enabled", but only when it is "false". The default value is "true".
2019-11-03 11:55:52 +01:00