Commit Graph

1129 Commits

Author SHA1 Message Date
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
fd4bf5f0a2 Merge pull request #8438 from JosJuice/tilt-tooltip-string
Change Wii Remote tilt tooltip string based on translator feedback
2019-10-30 05:39:13 -04:00
1f3d1a9b7f Merge pull request #8352 from rlnilsen/motion-controller-support-via-cemuhook-protocol
Support for motion controllers like the DualShock 4
2019-10-28 16:39:10 +01:00
f4da08eb13 Change Wii Remote tilt tooltip string based on translator feedback 2019-10-28 11:16:55 +01:00
da1f153b47 Rename all instances of "CemuhookUDPServer"/"UDPServer" to "DualShockUDPClient"/"DSUClient". 2019-10-27 16:05:22 +01:00
5ff79499a5 UDPServer: Add configuration UI.
Accessed through button "Alternate Input Sources" in the "Controller Settings" dialog.
2019-10-26 02:20:18 +02:00
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
c6b4438c62 InputCommon: Change "EOF" to "end of expression" in user facing string
This is hopefully clearer, since we're not dealing with a file.
2019-10-25 23:49:20 +02:00
1fe44238b1 ExpressionParser: Add XOR operator. 2019-10-20 09:51:52 -05:00
8bc0a92f2c Merge pull request #7663 from jordan-woyak/expression-parser-improve
Expression parser improvements
2019-10-17 17:35:30 -04:00
a21b7b1bdd Merge pull request #8390 from jordan-woyak/wiimote-emu-tilt-fix
WiimoteEmu: Tilt fixes.
2019-10-16 16:14:42 -07:00
b120b08726 ControllerEmu: Clamp results of trigger/slider states to prevent integer overflow later on. 2019-10-15 15:35:07 -05:00
7295458c11 ExpressionParser: Make Lexer ctor explicit and move argument. 2019-10-12 12:28:19 -05:00
72302d9c42 ExpressionParser: Add support for /* */ style comments. 2019-10-12 11:41:02 -05:00
b4e2b3cae3 ControllerEmu: Don't clear expression variables on references update. Hotplug would make that problematic. 2019-10-11 19:42:49 -05:00
4d41bd64c8 ExpressionParser: Show error message with expected arguments. 2019-10-11 19:38:18 -05:00
b57178d246 ExpressionParser: Remove ! character from function syntax. Remove unused serialization functions. 2019-10-11 18:12:18 -05:00
7912dc57dd ExpressionParser: Remove !while and add optional 2nd argument to !smooth. 2019-10-11 18:12:18 -05:00
ca7ce67450 ExpressionParser/DolphinQt: Added parse results to UI. 2019-10-11 18:12:18 -05:00
c8b2188e19 DolphinQT: Add syntax highlighting from tokenizer data. 2019-10-11 18:12:18 -05:00
5cb1248612 ExpressionParser: Clean up some redundant using-declarations and wrong comments. 2019-10-11 18:12:18 -05:00
fae8b15db1 ExpressionParser: Add !pulse function that evaluates to 1.0 for N seconds for each press. 2019-10-11 18:12:18 -05:00
b5b43f8342 ExpressionParser: Add relative input function. 2019-10-11 18:12:18 -05:00
08b291b0f9 ExpressionParser: Fix timer function with negative values. 2019-10-11 18:12:18 -05:00
18b5120441 ExpressionParser: Add !tap function which activates after X (defaults to 2) taps within Y seconds. 2019-10-11 18:12:17 -05:00
f2e499d587 ExpressionParser: Add !hold function that activates after input is held for N seconds. 2019-10-11 18:12:17 -05:00
9e536382c4 ExpressionParser: Add function to smooth inputs. 2019-10-11 18:12:17 -05:00
bbd6b1848f ExpressionParser: Add deadzone function. 2019-10-11 18:12:17 -05:00
6a2096c419 ExpressionParser: Add optional 2nd argument to toggle function which clears state. 2019-10-11 18:12:17 -05:00
fd07ae8cec ExpressionParser: Move FunctionExpression type definitions into another file. 2019-10-11 18:12:16 -05:00
d4f9b8c4ef ExpressionParser: Allow unary functions to be used without parens around the argument. e.g. !Up 2019-10-11 17:31:09 -05:00
2a377e35ed ExpressionParser: Make function names case sensitive. 2019-10-11 17:31:09 -05:00
2b0297489f ExpressionParser: Rename some functions and return a syntax error on trailing tokens. 2019-10-11 17:31:09 -05:00
258832b1e8 ExpressionParser: Change function argument syntax to something more c++-like. 2019-10-11 17:31:09 -05:00
ccac3f1e49 ExpressionParser: Fix negative literals and support unary minus operator. 2019-10-11 17:31:07 -05:00
7cf903a209 ExpressionParser: Suppport N-ary functions. Arguments are read LISP style. N atoms are read after the function name. Added "if" function and made the "while" function more sensible with an arity of 2. Removed the ugly binary conditional operator. 2019-10-11 17:16:05 -05:00
4dd078568b ExpressionParser: Replace the timer literal with a timer function that increases from 0.0 to 1.0 and resets after N seconds. e.g. (!timer 2.0) is a 2 second timer. Fixed parsing of unary expressions so things like (! ! 1.0) work. 2019-10-11 17:14:45 -05:00