From 0219547a16bbeb988c2664f71656e67b43f934d2 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Thu, 8 Aug 2024 19:13:20 -0400 Subject: [PATCH] Put Wacom tablets on dev branch --- CMakeLists.txt | 1 + src/device/CMakeLists.txt | 5 +++++ src/device/mouse.c | 2 +- src/include/86box/mouse.h | 2 ++ src/qt/CMakeLists.txt | 4 ++++ 5 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ca75ebc25..e307d6d2f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -163,6 +163,7 @@ cmake_dependent_option(OPEN_AT "OpenAT" cmake_dependent_option(OPL4ML "OPL4-ML daughterboard" ON "DEV_BRANCH" OFF) cmake_dependent_option(PCL "Generic PCL5e Printer" ON "DEV_BRANCH" OFF) cmake_dependent_option(SIO_DETECT "Super I/O Detection Helper" ON "DEV_BRANCH" OFF) +cmake_dependent_option(WACOM "Wacom Input Devices" ON "DEV_BRANCH" OFF) cmake_dependent_option(XL24 "ATI VGA Wonder XL24 (ATI-28800-6)" ON "DEV_BRANCH" OFF) # Ditto but for Qt diff --git a/src/device/CMakeLists.txt b/src/device/CMakeLists.txt index e48f30d0f..b8dcdf0c5 100644 --- a/src/device/CMakeLists.txt +++ b/src/device/CMakeLists.txt @@ -45,3 +45,8 @@ endif() if(LASERXT) target_compile_definitions(dev PRIVATE USE_LASERXT) endif() + +if(WACOM) + target_compile_definitions(dev PRIVATE USE_WACOM) + target_sources(dev PRIVATE mouse_wacom_tablet.c) +endif() diff --git a/src/device/mouse.c b/src/device/mouse.c index 8fd783ee2..fc193398b 100644 --- a/src/device/mouse.c +++ b/src/device/mouse.c @@ -98,7 +98,7 @@ static mouse_t mouse_devices[] = { { &mouse_wacom_device }, { &mouse_wacom_artpad_device }, #endif - { &mouse_mtouch_device }, + { &mouse_mtouch_device }, { NULL } // clang-format on }; diff --git a/src/include/86box/mouse.h b/src/include/86box/mouse.h index 810d62293..bbe78413b 100644 --- a/src/include/86box/mouse.h +++ b/src/include/86box/mouse.h @@ -71,8 +71,10 @@ extern const device_t mouse_mssystems_device; extern const device_t mouse_msserial_device; extern const device_t mouse_ltserial_device; extern const device_t mouse_ps2_device; +# ifdef USE_WACOM extern const device_t mouse_wacom_device; extern const device_t mouse_wacom_artpad_device; +# endif extern const device_t mouse_mtouch_device; #endif diff --git a/src/qt/CMakeLists.txt b/src/qt/CMakeLists.txt index db0a6353f..171e0a77c 100644 --- a/src/qt/CMakeLists.txt +++ b/src/qt/CMakeLists.txt @@ -190,6 +190,10 @@ if(RTMIDI) target_compile_definitions(ui PRIVATE USE_RTMIDI) endif() +if(WACOM) + target_compile_definitions(ui PRIVATE USE_WACOM) +endif() + if(WIN32) enable_language(RC) target_sources(86Box PUBLIC 86Box-qt.rc)