48 Commits

Author SHA1 Message Date
Henrik Rydgård
e0c12c9547 More lint warning fixes 2024-10-10 10:52:45 +02:00
Henrik Rydgård
63181374c7 Finish previous commit 2023-12-29 17:24:15 +01:00
Henrik Rydgård
f42e9d94a3 Show the tilt input type directly on the item that goes to the tilt settings 2023-12-29 14:10:03 +01:00
Henrik Rydgård
94fb81466f Tilt: Make the deadzone circular, in addition to the inverse (low end radius). 2023-12-12 17:55:13 +01:00
Henrik Rydgård
25ab1206b5 Fix stepping of tilt low end radius setting. Add some asserts. 2023-11-06 18:33:05 -06:00
Henrik Rydgård
3b004e7a4b Remove the last use of accelerometer axis events (calibration) 2023-09-27 11:33:40 +02:00
Henrik Rydgård
e0c5857927 Tilt analog settings: Fix failure to reinitialize tilt_ when creating views.
This caused crashes due to tilt_ ending up pointing to a deleted object
after recreate instead of null (in which case we would have avoided the
writes).

Fixes #18105
2023-09-08 15:50:57 +02:00
Henrik Rydgård
2675d6ea43 Input event and device enums (#17514)
* Switch deviceID from int to enum InputDeviceID, globally

* Switch axisId to enum InputAxis

* Change int keycodes to InputKeyCode where it makes sense.

* SDL input buildfix

* SDL keycode buildfix

* Switch on enum warning fixes

* Qt keycode buildfix

* iOS keycode buildfix

* UWP keycode buildfix

* More iOS buildfix

* More iOS buildfix

* Update DinputDevice.cpp
2023-05-26 18:40:13 +02:00
Henrik Rydgård
2ceb9942f3 Tilt: Add back inverse deadzone (low end radius). Allow choosing circular or per-axis. 2023-05-22 10:13:57 +02:00
Henrik Rydgård
ee6234ecb6 I18N: Switch to getting categories by index instead of by string lookup
Also gets rid of the shared_ptr usage, and generally makes things nicer.

Needed for later config refactorings, good to get in early.
2023-04-07 10:35:01 +02:00
Henrik Rydgård
6f9339b011 Add defaults for all int-slider settings too 2023-04-05 10:50:53 +02:00
Henrik Rydgård
4e0babc950 Add a "reset to default" for all float-slider settings
Unfortunately, the default values from the configs are not exposed
outside Config.cpp, so there's duplication.

Need to figure out how to do fix that, but it's out-of-scope for this
PR.
2023-04-05 10:50:53 +02:00
Henrik Rydgård
64e80423a6 Simplify the tilt code, tweak a bit 2023-02-16 11:07:57 +01:00
Henrik Rydgård
7d40ed6ba1 Tilt control: Split the deadzone parameter since it needs to be different for different types.
Can at least share the string without problems.

Also rearrange the settings a little bit.
2023-02-11 23:42:55 +01:00
Henrik Rydgård
af8e4cd36b Fixes for portrait mode. Move the haptic feedback setting where it belongs. 2023-02-02 11:59:56 +01:00
Henrik Rydgård
cdca958781 Change "Customize tilt..." to "Tilt control setup" 2023-02-02 11:05:33 +01:00
Henrik Rydgård
6b7a51d73e Move tilt type selector into the customization dialog 2023-02-02 11:05:29 +01:00
Henrik Rydgård
59dec197d8 Add previews for more types, fix mappings. 2023-02-02 01:09:33 +01:00
Henrik Rydgård
1f51a31544 Remove the separate deadzone-skip value. 2023-02-02 01:09:30 +01:00
Henrik Rydgård
4aeb1ef703 Better math, fix tilt calibration (was entirely broken) 2023-02-02 01:01:05 +01:00
Henrik Rydgård
9e3cc66809 Tilt: Add visualizer to customize tilt dialog. Improve defaults. 2023-02-01 15:35:57 +01:00
Henrik Rydgård
a88bafff4d Break out the JoystickHistoryView 2023-02-01 14:58:16 +01:00
Henrik Rydgård
102607a6e8 Code style fixes, translation key fix, cleanup 2023-02-01 14:24:55 +01:00
Henrik Rydgård
07114c6aaf Remove return value from axis functions in API 2023-01-10 10:12:37 +01:00
Unknown W. Brackets
d5a9525fff UI: Cleanup another header misuse. 2021-09-27 17:47:15 -07:00