Fix build errors with IH_DirectInput using the Win SDK

* dxguid.lib no longer exists.
* older SDKs (like the v140_xp toolset) don't provide XUSER_MAX_COUNT.
This commit is contained in:
Tracy Ward
2019-10-04 09:46:51 -04:00
parent 2bce815a1a
commit 626e58700e
2 changed files with 6 additions and 3 deletions
@@ -20,6 +20,12 @@
#include <WbemIdl.h>
#include <OleAuto.h>
// this may not be defined if we are using an older Windows SDK. (for instance, toolsetversion v140_xp does not define it)
// the number was taken from the documentation
#ifndef XUSER_MAX_COUNT
#define XUSER_MAX_COUNT 4
#endif
REGISTER_INPUT_HANDLER_CLASS2( DirectInput, DInput );
static vector<DIDevice> Devices;
@@ -8,9 +8,6 @@
#if defined(_MSC_VER)
#pragma comment(lib, "dinput8.lib")
#if defined(_WINDOWS)
#pragma comment(lib, "dxguid.lib")
#endif
#endif
LPDIRECTINPUT8 g_dinput = nullptr;