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
This commit is contained in:
darkstar
2018-02-21 22:45:09 +01:00
parent 20f7a186f8
commit d66f26ae8b

View File

@@ -38,6 +38,10 @@
*/
#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>
#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 <math.h>
#include <stdio.h>
#include <stdint.h>