From e337db055333bfab558862840ae67beb9294b129 Mon Sep 17 00:00:00 2001 From: Craig Carnell <1188869+cscd98@users.noreply.github.com> Date: Mon, 8 Dec 2025 19:35:04 +0000 Subject: [PATCH] mingw: link in dinput8/cfgmgr32 to fix compilation failure --- Source/Core/InputCommon/CMakeLists.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Source/Core/InputCommon/CMakeLists.txt b/Source/Core/InputCommon/CMakeLists.txt index 0e5612f353..3b9d833183 100644 --- a/Source/Core/InputCommon/CMakeLists.txt +++ b/Source/Core/InputCommon/CMakeLists.txt @@ -108,6 +108,20 @@ if(WIN32) ControllerInterface/ForceFeedback/ForceFeedbackDevice.cpp ControllerInterface/ForceFeedback/ForceFeedbackDevice.h ) + check_cxx_compiler_flag(-fexceptions HAS_FEXCEPTIONS) + if(HAS_FEXCEPTIONS) + set_source_files_properties( + ControllerInterface/WGInput/WGInput.cpp + PROPERTIES COMPILE_OPTIONS "-fexceptions" + ) + endif() + if(MINGW) + target_link_libraries(inputcommon + PRIVATE + dinput8 + cfgmgr32 + ) + endif() elseif(APPLE) target_sources(inputcommon PRIVATE ControllerInterface/Quartz/Quartz.h