diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-05-30 14:47:42 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-05-30 14:47:42 +0200 |
commit | a79e5b0e24e9b756e88d97173e76a91a59f6eb6a (patch) | |
tree | a1138c78590b33607ea00932790ab7c6574e5a36 | |
parent | 733b0ff713eb28c7c4b7dab5d3de423f784f2734 (diff) |
vjoy: Fix POV hat state
POV hat key was always stuck in one position, confusing certain games.
Reported-by: ASQ_Dak
Fix-by: Rickard Öberg
Tested-by: no one at all!
-rw-r--r-- | ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.cpp b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.cpp index 76767c3b..a3a5cb5f 100644 --- a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.cpp +++ b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.cpp @@ -16,6 +16,8 @@ FTNoIR_Protocol::~FTNoIR_Protocol() void FTNoIR_Protocol::sendHeadposeToGame( const double *headpose ) { JOYSTICK_STATE state[2] = { 0 }; + + state[0].POV = (4 << 12) | (4 << 8) | (4 << 4) | 4; state[0].XAxis = std::min<int>(VJOY_AXIS_MAX, std::max<int>(VJOY_AXIS_MIN, headpose[Yaw] * VJOY_AXIS_MAX / 180.0)); state[0].YAxis = std::min<int>(VJOY_AXIS_MAX, std::max<int>(VJOY_AXIS_MIN, headpose[Pitch] * VJOY_AXIS_MAX / 180.0)); |