From 2e10c5a870b6c3221b40c7b43d20aecffde128bf Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Thu, 7 Mar 2024 18:20:55 +0500 Subject: [PATCH] CMake: Move DirectInput backend option to Win32 UI --- CMakeLists.txt | 1 - src/qt/CMakeLists.txt | 8 +------- src/win/CMakeLists.txt | 1 + 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cacf1aaa4..ae39fbccf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -131,7 +131,6 @@ option(RTMIDI "RtMidi" option(FLUIDSYNTH "FluidSynth" ON) option(MUNT "MUNT" ON) option(VNC "VNC renderer" OFF) -option(DINPUT "DirectInput" OFF) option(CPPTHREADS "C++11 threads" ON) option(NEW_DYNAREC "Use the PCem v15 (\"new\") dynamic recompiler" OFF) option(MINITRACE "Enable Chrome tracing using the modified minitrace library" OFF) diff --git a/src/qt/CMakeLists.txt b/src/qt/CMakeLists.txt index 4f073cf4a..23c5964b3 100644 --- a/src/qt/CMakeLists.txt +++ b/src/qt/CMakeLists.txt @@ -190,13 +190,7 @@ endif() if(WIN32) enable_language(RC) target_sources(86Box PUBLIC ../win/86Box-qt.rc) - target_sources(plat PRIVATE win_dynld.c) - if(DINPUT) - target_sources(plat PRIVATE win_joystick.cpp) - target_link_libraries(86Box dinput8) - else() - target_sources(plat PRIVATE win_joystick_rawinput.c) - endif() + target_sources(plat PRIVATE win_dynld.c win_joystick_rawinput.c) target_link_libraries(86Box hid) # CMake 3.22 messed this up for clang/clang++ diff --git a/src/win/CMakeLists.txt b/src/win/CMakeLists.txt index 604ba9bb0..dc8c53e45 100644 --- a/src/win/CMakeLists.txt +++ b/src/win/CMakeLists.txt @@ -51,6 +51,7 @@ if(NOT MINGW) target_sources(plat PRIVATE win_opendir.c) endif() +option(DINPUT "Use DirectInput joystick backend instead of raw input" OFF) if(DINPUT) target_sources(plat PRIVATE win_joystick.cpp) target_link_libraries(86Box dinput8)