xpad: Use the Windows SDK and remove unneeded dependencies

This commit is contained in:
Jonathan Li 2016-02-29 00:57:21 +00:00
parent 13bb7cf30a
commit a80a7175f3
3 changed files with 4 additions and 5 deletions

View File

@ -12,7 +12,6 @@
#include <commctrl.h>
#include <commdlg.h>
#include <shellapi.h>
#include <xinput.h>
#include <assert.h>
#include <time.h>

View File

@ -12,16 +12,12 @@
<WarningLevel>Level4</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4995;4324;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<AdditionalIncludeDirectories>$(DXSDK_DIR)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalDependencies>d3d10.lib;d3dx10.lib;d3d9.lib;d3dx9.lib;dxguid.lib;winmm.lib;strmiids.lib;xinput.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>..\..\bin\plugins\$(ProjectName).dll</OutputFile>
<DelayLoadDLLs>d3d9.dll;d3dx9_43.dll;d3d10.dll;d3dx10_43.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<AdditionalLibraryDirectories>$(DXSDK_DIR)Lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
</Project>

View File

@ -23,6 +23,10 @@
#include "xpad.h"
#include <VersionHelpers.h>
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x0602 // Required for XInputEnable definition
#include <xinput.h>
static HMODULE s_hModule;
static HMODULE s_xInputDll;
static decltype(&XInputEnable) pXInputEnable;