From 82808288c077a4a25bc4d995284d9af1d93dc13a Mon Sep 17 00:00:00 2001 From: CTurt Date: Fri, 19 Dec 2014 19:17:25 +0000 Subject: [PATCH] Central rotation --- PC/include/joystick.h | 2 ++ PC/source/joystick.c | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/PC/include/joystick.h b/PC/include/joystick.h index 37c57db..2efba2b 100644 --- a/PC/include/joystick.h +++ b/PC/include/joystick.h @@ -9,6 +9,8 @@ #include "public.h" #include "vjoyinterface.h" +#define JOY_MIDDLE (128 * 128) + extern int ContPovNumber; extern UINT iInterface; extern BOOL ContinuousPOV; diff --git a/PC/source/joystick.c b/PC/source/joystick.c index cc8a6de..c24c40a 100644 --- a/PC/source/joystick.c +++ b/PC/source/joystick.c @@ -15,9 +15,10 @@ BOOL updateJoystick(int x, int y) { iReport.wAxisX = x; iReport.wAxisY = y; - iReport.wAxisZ = 128 * 128; - iReport.wAxisZRot = 0; - iReport.wAxisXRot = 0; + iReport.wAxisZ = JOY_MIDDLE; + iReport.wAxisXRot = JOY_MIDDLE; + iReport.wAxisYRot = JOY_MIDDLE; + iReport.wAxisZRot = JOY_MIDDLE; iReport.lButtons = 0;