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