Skip to content

Commit 1849083

Browse files
Use hidapi for Wiimotes on Windows (#1033)
1 parent 09409a5 commit 1849083

File tree

6 files changed

+4
-175
lines changed

6 files changed

+4
-175
lines changed

CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,9 @@ if (WIN32)
8989
option(ENABLE_XINPUT "Enables the usage of XInput" ON)
9090
option(ENABLE_DIRECTINPUT "Enables the usage of DirectInput" ON)
9191
add_compile_definitions(HAS_DIRECTINPUT)
92-
set(ENABLE_WIIMOTE ON)
93-
elseif (UNIX)
94-
option(ENABLE_HIDAPI "Build with HIDAPI" ON)
9592
endif()
93+
94+
option(ENABLE_HIDAPI "Build with HIDAPI" ON)
9695
option(ENABLE_SDL "Enables the SDLController backend" ON)
9796

9897
# audio backends

src/input/CMakeLists.txt

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,9 @@ if (ENABLE_WIIMOTE)
7070
api/Wiimote/NativeWiimoteController.h
7171
api/Wiimote/NativeWiimoteController.cpp
7272
api/Wiimote/WiimoteDevice.h
73-
)
74-
if (ENABLE_HIDAPI)
75-
target_sources(CemuInput PRIVATE
7673
api/Wiimote/hidapi/HidapiWiimote.cpp
7774
api/Wiimote/hidapi/HidapiWiimote.h
78-
)
79-
elseif (WIN32)
80-
target_sources(CemuInput PRIVATE
81-
api/Wiimote/windows/WinWiimoteDevice.cpp
82-
api/Wiimote/windows/WinWiimoteDevice.h
83-
)
84-
endif()
75+
)
8576
endif ()
8677

8778

src/input/api/Wiimote/WiimoteControllerProvider.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
#include "input/api/Wiimote/NativeWiimoteController.h"
33
#include "input/api/Wiimote/WiimoteMessages.h"
44

5-
#ifdef HAS_HIDAPI
65
#include "input/api/Wiimote/hidapi/HidapiWiimote.h"
7-
#elif BOOST_OS_WINDOWS
8-
#include "input/api/Wiimote/windows/WinWiimoteDevice.h"
9-
#endif
106

117
#include <numbers>
128
#include <queue>

src/input/api/Wiimote/windows/WinWiimoteDevice.cpp

Lines changed: 0 additions & 130 deletions
This file was deleted.

src/input/api/Wiimote/windows/WinWiimoteDevice.h

Lines changed: 0 additions & 24 deletions
This file was deleted.

vcpkg.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@
2626
"boost-static-string",
2727
"boost-random",
2828
"fmt",
29-
{
30-
"name": "hidapi",
31-
"platform": "!windows"
32-
},
29+
"hidapi",
3330
"libpng",
3431
"glm",
3532
{

0 commit comments

Comments
 (0)