Browse Source

Work around a compiler bug in old versions of VS2013 (resolves issue #1458).

Alex Szpakowski 6 years ago
parent
commit
c8d2d76df7
1 changed files with 4 additions and 2 deletions
  1. 4 2
      src/modules/joystick/sdl/Joystick.h

+ 4 - 2
src/modules/joystick/sdl/Joystick.h

@@ -110,13 +110,15 @@ private:
 	{
 	{
 		float left  = 0.0f;
 		float left  = 0.0f;
 		float right = 0.0f;
 		float right = 0.0f;
-		SDL_HapticEffect effect = {};
+		SDL_HapticEffect effect;
 		Uint16 data[4];
 		Uint16 data[4];
 		int id = -1;
 		int id = -1;
 		Uint32 endtime = SDL_HAPTIC_INFINITY;
 		Uint32 endtime = SDL_HAPTIC_INFINITY;
 
 
+		// Old versions of VS2013 have trouble with initializing these in-line.
 		Vibration()
 		Vibration()
-			: data() // VS2013 can't initialize the array above...
+			: effect()
+			, data()
 		{}
 		{}
 
 
 	} vibration;
 	} vibration;