You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The TOUCH_STATE struct I used and added into JoyShockLibrary.cs was in a wrong form despite the fact that I directly copied it fromJoyShockLibrary.h @ Line 111. Here's TOUCH_STATE struct declared on that said file:
typedefstructTOUCH_STATE {
int t0Id;
int t1Id;
bool t0Down;
bool t1Down;
float t0X;
float t0Y;
float t1X;
float t1Y;
} TOUCH_STATE;
...and here's that same struct I converted to C# initially:
It is already identical, and yet it yields data in a different sequence. I found out later on that the methods that return TOUCH_STATE structs do not contain any values that should be for t1Down.
WORKAROUND SOLUTION
Putting the public bool t1Down; or public float t1Down; at the very bottom of the struct returns proper values for both touches. This is how the C# struct looks now:
[StructLayout(LayoutKind.Sequential)]publicstructMODIFIED_TOUCH_STATE{publicintt0Id;publicintt1Id;publicboolt0Down;publicfloatt0X;publicfloatt0Y;publicfloatt1X;publicfloatt1Y;publicfloatt1Down;// still nothing}
My tests still don't show any change in value on t1Down after moving it downwards, so I'm thinking there's no value for checking if there's a second touch? I wish to help look into your source code to pinpoint where this problem stems from, but I don't know much about C++. I'm just going to bet that it's within the InputHelpers.cpp of yours.
I'm willing to answer further questions that may help you!
The text was updated successfully, but these errors were encountered:
VERSION: Release v2.2.0
ISSUE
The
TOUCH_STATE
struct I used and added intoJoyShockLibrary.cs
was in a wrong form despite the fact that I directly copied it fromJoyShockLibrary.h
@ Line 111. Here's TOUCH_STATE struct declared on that said file:...and here's that same struct I converted to C# initially:
It is already identical, and yet it yields data in a different sequence. I found out later on that the methods that return
TOUCH_STATE
structs do not contain any values that should be fort1Down
.WORKAROUND SOLUTION
Putting the
public bool t1Down;
orpublic float t1Down;
at the very bottom of the struct returns proper values for both touches. This is how the C# struct looks now:My tests still don't show any change in value on
t1Down
after moving it downwards, so I'm thinking there's no value for checking if there's a second touch? I wish to help look into your source code to pinpoint where this problem stems from, but I don't know much about C++. I'm just going to bet that it's within theInputHelpers.cpp
of yours.I'm willing to answer further questions that may help you!
The text was updated successfully, but these errors were encountered: