From a79e5b0e24e9b756e88d97173e76a91a59f6eb6a Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 30 May 2014 14:47:42 +0200 Subject: vjoy: Fix POV hat state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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! --- ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.cpp | 2 ++ 1 file changed, 2 insertions(+) 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(VJOY_AXIS_MAX, std::max(VJOY_AXIS_MIN, headpose[Yaw] * VJOY_AXIS_MAX / 180.0)); state[0].YAxis = std::min(VJOY_AXIS_MAX, std::max(VJOY_AXIS_MIN, headpose[Pitch] * VJOY_AXIS_MAX / 180.0)); -- cgit v1.2.3