mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-06 15:01:18 +12:00
Make Bluez optional
This commit is contained in:
parent
cc2212a441
commit
182e90500f
2 changed files with 12 additions and 5 deletions
|
@ -98,6 +98,7 @@ endif()
|
||||||
if (UNIX AND NOT APPLE)
|
if (UNIX AND NOT APPLE)
|
||||||
option(ENABLE_WAYLAND "Build with Wayland support" ON)
|
option(ENABLE_WAYLAND "Build with Wayland support" ON)
|
||||||
option(ENABLE_FERAL_GAMEMODE "Enables Feral Interactive GameMode Support" ON)
|
option(ENABLE_FERAL_GAMEMODE "Enables Feral Interactive GameMode Support" ON)
|
||||||
|
option(ENABLE_BLUEZ "Build with Bluez support" ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(ENABLE_OPENGL "Enables the OpenGL backend" ON)
|
option(ENABLE_OPENGL "Enables the OpenGL backend" ON)
|
||||||
|
@ -178,7 +179,12 @@ if (UNIX AND NOT APPLE)
|
||||||
add_compile_definitions(HAS_WAYLAND)
|
add_compile_definitions(HAS_WAYLAND)
|
||||||
endif()
|
endif()
|
||||||
find_package(GTK3 REQUIRED)
|
find_package(GTK3 REQUIRED)
|
||||||
find_package(bluez REQUIRED)
|
|
||||||
|
if(ENABLE_BLUEZ)
|
||||||
|
find_package(bluez REQUIRED)
|
||||||
|
set(ENABLE_WIIMOTE ON)
|
||||||
|
add_compile_definitions(HAS_BLUEZ)
|
||||||
|
endif()
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
#include "input/api/Wiimote/WiimoteControllerProvider.h"
|
#include "input/api/Wiimote/WiimoteControllerProvider.h"
|
||||||
#include "input/api/Wiimote/NativeWiimoteController.h"
|
#include "input/api/Wiimote/NativeWiimoteController.h"
|
||||||
#include "input/api/Wiimote/WiimoteMessages.h"
|
#include "input/api/Wiimote/WiimoteMessages.h"
|
||||||
#if HAS_HIDAPI
|
|
||||||
|
#ifdef HAS_HIDAPI
|
||||||
#include "input/api/Wiimote/hidapi/HidapiWiimote.h"
|
#include "input/api/Wiimote/hidapi/HidapiWiimote.h"
|
||||||
#endif
|
#endif
|
||||||
#if BOOST_OS_LINUX
|
#ifdef HAS_BLUEZ
|
||||||
#include "input/api/Wiimote/l2cap/L2CapWiimote.h"
|
#include "input/api/Wiimote/l2cap/L2CapWiimote.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -150,11 +151,11 @@ void WiimoteControllerProvider::connectionThread()
|
||||||
while (m_running.load(std::memory_order_relaxed))
|
while (m_running.load(std::memory_order_relaxed))
|
||||||
{
|
{
|
||||||
std::vector<WiimoteDevicePtr> devices;
|
std::vector<WiimoteDevicePtr> devices;
|
||||||
#if HAS_HIDAPI
|
#ifdef HAS_HIDAPI
|
||||||
const auto& hidDevices = HidapiWiimote::get_devices();
|
const auto& hidDevices = HidapiWiimote::get_devices();
|
||||||
std::ranges::move(hidDevices, std::back_inserter(devices));
|
std::ranges::move(hidDevices, std::back_inserter(devices));
|
||||||
#endif
|
#endif
|
||||||
#if BOOST_OS_LINUX
|
#ifdef HAS_BLUEZ
|
||||||
const auto& l2capDevices = L2CapWiimote::get_devices();
|
const auto& l2capDevices = L2CapWiimote::get_devices();
|
||||||
std::ranges::move(l2capDevices, std::back_inserter(devices));
|
std::ranges::move(l2capDevices, std::back_inserter(devices));
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue