From 2d1b4dc9778856ad981b0d4cd49416e973ba5b9c Mon Sep 17 00:00:00 2001 From: D G Turner Date: Wed, 24 Jul 2019 21:59:15 +0100 Subject: COMMON: Add Default Values for Joystick State Structure This ensures that this has a defined value when used without the engine needing to set the field values directly i.e. as per CGE. --- common/events.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/events.h b/common/events.h index 4b45d530c8..cbd6153e54 100644 --- a/common/events.h +++ b/common/events.h @@ -111,6 +111,8 @@ struct JoystickState { * buttons. See JoystickButton. */ int8 button; + + JoystickState() : axis(0), position(0), button(0) {} }; /** -- cgit v1.2.3