Skip to content

Commit

Permalink
Use hidapi for Wiimotes on Windows (#1033)
Browse files Browse the repository at this point in the history
  • Loading branch information
capitalistspz authored Dec 6, 2023
1 parent 09409a5 commit 1849083
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 175 deletions.
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,9 @@ if (WIN32)
option(ENABLE_XINPUT "Enables the usage of XInput" ON)
option(ENABLE_DIRECTINPUT "Enables the usage of DirectInput" ON)
add_compile_definitions(HAS_DIRECTINPUT)
set(ENABLE_WIIMOTE ON)
elseif (UNIX)
option(ENABLE_HIDAPI "Build with HIDAPI" ON)
endif()

option(ENABLE_HIDAPI "Build with HIDAPI" ON)
option(ENABLE_SDL "Enables the SDLController backend" ON)

# audio backends
Expand Down
11 changes: 1 addition & 10 deletions src/input/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,9 @@ if (ENABLE_WIIMOTE)
api/Wiimote/NativeWiimoteController.h
api/Wiimote/NativeWiimoteController.cpp
api/Wiimote/WiimoteDevice.h
)
if (ENABLE_HIDAPI)
target_sources(CemuInput PRIVATE
api/Wiimote/hidapi/HidapiWiimote.cpp
api/Wiimote/hidapi/HidapiWiimote.h
)
elseif (WIN32)
target_sources(CemuInput PRIVATE
api/Wiimote/windows/WinWiimoteDevice.cpp
api/Wiimote/windows/WinWiimoteDevice.h
)
endif()
)
endif ()


Expand Down
4 changes: 0 additions & 4 deletions src/input/api/Wiimote/WiimoteControllerProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
#include "input/api/Wiimote/NativeWiimoteController.h"
#include "input/api/Wiimote/WiimoteMessages.h"

#ifdef HAS_HIDAPI
#include "input/api/Wiimote/hidapi/HidapiWiimote.h"
#elif BOOST_OS_WINDOWS
#include "input/api/Wiimote/windows/WinWiimoteDevice.h"
#endif

#include <numbers>
#include <queue>
Expand Down
130 changes: 0 additions & 130 deletions src/input/api/Wiimote/windows/WinWiimoteDevice.cpp

This file was deleted.

24 changes: 0 additions & 24 deletions src/input/api/Wiimote/windows/WinWiimoteDevice.h

This file was deleted.

5 changes: 1 addition & 4 deletions vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@
"boost-static-string",
"boost-random",
"fmt",
{
"name": "hidapi",
"platform": "!windows"
},
"hidapi",
"libpng",
"glm",
{
Expand Down

0 comments on commit 1849083

Please sign in to comment.