8 files changed
+55
-30
No files matched your search
@@ -751,6 +751,12 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
|
||||
# OpenBSD doesn't allow memory to be both writable and executable by default.
|
||||
# The JIT currently needs this.
|
||||
target_link_options(core PUBLIC -Wl,-zwxneeded)
|
||||
endif()
|
||||
|
||||
if(TARGET Hidapi::Hidapi)
|
||||
target_sources(core PRIVATE
|
||||
HW/WiimoteReal/IOhidapi.cpp
|
||||
|
||||
@@ -41,6 +41,13 @@ namespace WiimoteReal
|
||||
{
|
||||
WiimoteScannerHidapi::WiimoteScannerHidapi()
|
||||
{
|
||||
#ifdef __OpenBSD__
|
||||
// OpenBSD renamed libhidapi's hidapi_init function because the system has its own USB library
|
||||
// which contains a symbol with the same name. See:
|
||||
// https://cvsweb.openbsd.org/ports/comms/libhidapi/patches/patch-hidapi_hidapi_h?rev=1.3&content-type=text/x-cvsweb-markup
|
||||
// https://man.openbsd.org/usbhid.3
|
||||
#define hid_init hidapi_hid_init
|
||||
#endif
|
||||
int ret = hid_init();
|
||||
ASSERT_MSG(WIIMOTE, ret == 0, "Couldn't initialise hidapi.");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user