shithub: cstory

Download patch

ref: a7f1d80a06304f089a5612fcbda3acf9dda22554
parent: fd19806eaf57c554d366318b27bfd103b4af3a50
author: Clownacy <Clownacy@users.noreply.github.com>
date: Thu Feb 13 13:14:30 EST 2020

Fix compilation with modern Visual Studio

--- a/src/Input.cpp
+++ b/src/Input.cpp
@@ -87,7 +87,11 @@
 
 	directinput_objects.lpDI->AddRef();
 
+#if defined(_MSC_VER) && _MSC_VER >= 1500
+	lpDI->EnumDevices(DI8DEVTYPE_JOYSTICK, EnumDevices_Callback, &directinput_objects, DIEDFL_ATTACHEDONLY);
+#else
 	lpDI->EnumDevices(DIDEVTYPE_JOYSTICK, EnumDevices_Callback, &directinput_objects, DIEDFL_ATTACHEDONLY);
+#endif
 
 	if (directinput_objects.lpDI != NULL)
 	{