From 979372baf8a990e04d2019002b7db6fdb8874dc1 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 22 Sep 2014 11:44:40 +0200 Subject: nix spurious warning --- ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.cpp b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.cpp index 803bc25a..2b8aa017 100644 --- a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.cpp +++ b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.cpp @@ -13,8 +13,9 @@ FTNoIR_Protocol::~FTNoIR_Protocol() } void FTNoIR_Protocol::sendHeadposeToGame( const double *headpose ) { +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" 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)); @@ -23,7 +24,7 @@ void FTNoIR_Protocol::sendHeadposeToGame( const double *headpose ) { state[0].XRotation = std::min(VJOY_AXIS_MAX, std::max(VJOY_AXIS_MIN, headpose[TX] * VJOY_AXIS_MAX / 100.0)); state[0].YRotation = std::min(VJOY_AXIS_MAX, std::max(VJOY_AXIS_MIN, headpose[TY] * VJOY_AXIS_MAX / 100.0)); state[0].ZRotation = std::min(VJOY_AXIS_MAX, std::max(VJOY_AXIS_MIN, headpose[TZ] * VJOY_AXIS_MAX / 100.0)); - + VJoy_UpdateJoyState(0, state); } -- cgit v1.2.3