Skip to content

Commit 6d2baab

Browse files
committed
Windows: Link with XInput 9.1.0.
1 parent a9406d3 commit 6d2baab

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

Source/ui_qt/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ if(TARGET_PLATFORM_WIN32)
195195
)
196196

197197
list(APPEND UI_QT_PROJECT_LIBS dinput8)
198-
list(APPEND UI_QT_PROJECT_LIBS xinput)
198+
list(APPEND UI_QT_PROJECT_LIBS xinput9_1_0)
199199
endif()
200200

201201
if(DEBUGGER_INCLUDED)

Source/ui_qt/win32/InputProviderXinput.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
#include "input/InputProvider.h"
44
#include <thread>
55
#include <Windows.h>
6+
7+
#pragma push_macro("_WIN32_WINNT")
8+
// We only want definitions from XInput 9.1.0
9+
#undef _WIN32_WINNT
10+
#define _WIN32_WINNT _WIN32_WINNT_WIN7
611
#include <Xinput.h>
12+
#pragma pop_macro("_WIN32_WINNT")
713

814
class CInputProviderXInput : public CInputProvider
915
{

0 commit comments

Comments
 (0)