Adds CMake Options for building portable AntiMicroX In Zzip format and incorporates it into the CI
https://github.com/AntiMicroX/antimicrox/pull/523
* CMake: add PORTABLE_WIN flag for compiling with portability on Windows
* CMake: use zip cpack generator for portable builds
* Add portable Windows zip to releases
* Ensure usage of proper compiling flags for portable build
Co-authored-by: Paweł Kotiuk <45544416+pktiuk@users.noreply.github.com>
This class manages a haptic feedback effect for a single DualSense controller
trigger. Two HaptiocTriggerPs5 objects are converted into a low-level USB
message and sent to the controller to apply the effect.
It supports click, rigid and vibration trigger feedback.
This new class is contained within InputDevice and will store multiple
calibration values for different controllers later.
For now, just define the data structure which is basically a union of
structs similar to SDL2 events.
Add presets for the existing mouse variants to gyroscope.
Add presets for existing keyboard variants to accelerometer.
Do not add all presets to both because a accelerometer mouse or a
gyroscope keyboard does not make too much sense.
Define the preset values in the caonstructor and not in the .ui file
to realize dynamic entries based on the sensor type.
With this commit, preset selection from the sensor edit dialog works.
Factor out a UI thread helper similar to
joycontrolstickcontextmenuhelper or joycontrolstickeditdialoghelper
which will be used used for both types of UI.
Use the existing mouse settings dialog as base and hide the parts that
are not needed for sensors. For example, an absolute mouse does not make
any sense for gyroscopes because they are relative sensors. Thus, only
show mouse sensitivity widgets.
Show this dialog based on JoyControlStickEditDialog when
clicking on the central sensor button in the GUI. It allows editing sensor
parameters with sliders and spin boxes.
This is the first time in the patcheset where sensors can be watch in
action in the GUI. Show raw and processed sensor values with correct units
in indicators.
Presets and sensor preview widget will be implemented in a later commit.
Draw sensor position like an artifical horizon instrument.
This should be very intuitive to understand for accelerometer and
not much more difficult for gyroscope. Only draw the diagonal zones for
the XY plane to avoid cluttering.
Add the required interfaces to JoySensor. Use dummies for non-trivial
interfaces.
This widget will be used in the coming sensor edit dialog and
calibration dialog.
If a controller has sensors, add configuration buttons similar to a
control stick to the main view. The layout is based on a isometric 3D view
with the regular XY axes and a diagonal Z axis.
Add a JoySensor button for every direction to the JoySensor object
and connect them to the "flashing" events. Add dummy methods for required
JoySensor interfaces.
Make all the QT connections in JoyTabWidgets as for a JoyControlStick.
But I'm not sure for what checkSensorDisplay and checkSensorEmptyDisplay are
really used.
The new buttons have no function yet. Even though it is possible to map
buttons to the sensor directions, but no events will be generated yet.
A specialized JoyButton subclass is necessary to store a pointer to the
JoySensor, to perform specialized mouse calculations and to store the
new 3D direction.
Add two additional subclasses for acceleromters and gyroscopes which
handle the translated direction name of the button.
Encode the 3D directions into a bitfield. This makes it easier to check
for combined three dimensional directions later. Furthermore, add
dummies for the required JoySensor interfaces.
This eases implementation of the differences between the two sensor
types in the following commits.
Add a factory method to simplify creation of the correct sensor object
in Set Joystick.
Enable sensor events in input daemon, handle them in all input
passes and finally activate them at the end of the last pass.
Set "pending" status bits in firstInputPass.
I'm not sure why exactly this is necessary since it worked well without
it but other analog inputs like axes and sticks do it.
So do it for sensors as well.
Add stub functions for all new interfaces required by the InputDaemon changes
as well as a stub JoySensor class.
Therefore, add querying methods hasRawSensor and getRawSensorRate to
InputDevice and its child classes. The sensor data rate will be necessary for
accelerometer shock detection.
Sensors are supported in SDL since version 2.0.14. Do no use sensor
functions in prior version because it will not compile on older
Linux distributions otherwise.
Do not pass the flag SDL_INIT_SENSOR during SDL initialization as it triggers
bug libsdl-org/SDL#4276 on windows and works well without it.
This is the same thing JoyShockMapper does. It appears SDL_INIT_SENSOR is
for different sensor types than those in gamecontrollers.
Show available sensors in the details view in the controller
properties dialog and log detected sensors.
The PT1 class implements a first order lag filter (or PT1).
This filter willl be used to denoise the calibration values
and later for sensor data processing.