From c8d2d76df72e3c837f2a822bc068e9e107e6c9ac Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Wed, 12 Dec 2018 11:26:14 -0400 Subject: [PATCH] Work around a compiler bug in old versions of VS2013 (resolves issue #1458). --- src/modules/joystick/sdl/Joystick.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/joystick/sdl/Joystick.h b/src/modules/joystick/sdl/Joystick.h index c3a264fc9..7b65ff3b6 100644 --- a/src/modules/joystick/sdl/Joystick.h +++ b/src/modules/joystick/sdl/Joystick.h @@ -110,13 +110,15 @@ private: { float left = 0.0f; float right = 0.0f; - SDL_HapticEffect effect = {}; + SDL_HapticEffect effect; Uint16 data[4]; int id = -1; Uint32 endtime = SDL_HAPTIC_INFINITY; + // Old versions of VS2013 have trouble with initializing these in-line. Vibration() - : data() // VS2013 can't initialize the array above... + : effect() + , data() {} } vibration;