From d66f26ae8b2f7b717b4dafa935653c3bdcdd2f83 Mon Sep 17 00:00:00 2001 From: darkstar Date: Wed, 21 Feb 2018 22:45:09 +0100 Subject: [PATCH] MSVC: Work around a DirectX SDK issue The symbol DIDEVTYPE_JOYSTICK gets defined only if DIRECTINPUT_VERSION is < 0x700, but then all DX8 symbols are missing. This probably works just fine with mingw headers. Since it's only one symbol that's missing, we'll just define that locally --- src/win/win_joystick.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/win/win_joystick.cpp b/src/win/win_joystick.cpp index 56e24ca..09b8b98 100644 --- a/src/win/win_joystick.cpp +++ b/src/win/win_joystick.cpp @@ -38,6 +38,10 @@ */ #define DIRECTINPUT_VERSION 0x0800 #include +#ifndef DIDEVTYPE_JOYSTICK +/* TODO: This is a crude hack to fix compilation on MSVC ... it needs a rework at some point */ +#define DIDEVTYPE_JOYSTICK 4 +#endif #include #include #include