DualSense-Windows icon indicating copy to clipboard operation
DualSense-Windows copied to clipboard

Is the Section trigger effect set up properly?

Open BLesnau opened this issue 3 years ago • 1 comments

In processTrigger(), the code for the Continuous trigger effect looks like this:

https://github.com/Ohjurot/DualSense-Windows/blob/0b869f4e34e4a6b608023a2f1e19bc28c037b64f/VS19_Solution/DualSenseWindows/src/DualSenseWindows/DS5_Output.cpp#L43-L50

And the code for the Section trigger effect looks like this:

https://github.com/Ohjurot/DualSense-Windows/blob/0b869f4e34e4a6b608023a2f1e19bc28c037b64f/VS19_Solution/DualSenseWindows/src/DualSenseWindows/DS5_Output.cpp#L53-L60

The Section trigger effect sets the first part of the array to a different value, which probably makes it do the Section effect rather than the Continuous effect, but the rest of that code actually uses the values from the Continuous effect.

The value for the end position should be put somewhere, correct?

Also, shouldn't the struct for the Section effect contain a value for the force to be used?

BLesnau avatar Jun 09 '21 20:06 BLesnau

Technically, it is setup properly. Because the trigger effect types are all wrapped in a union, meaning all members in the struct will share the same memory space, think of it as structs overlaying over each other. So startPosition of struct Continuous would have the same value as startPosition of struct Section, due to how it's laid out in the structs. But of course, it should still use the Section struct, for readability.

And yeah a force parameter for the Section type would be useful as well.

AliElSaleh avatar Feb 13 '22 14:02 AliElSaleh