sync ports with The Matrix

This commit is contained in:
purplerain 2023-09-14 00:49:35 +00:00
parent 9d4d2e721a
commit 79bc6d9d97
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
846 changed files with 10693 additions and 8131 deletions

View file

@ -0,0 +1,27 @@
Index: src/slic3r/GUI/Mouse3DController.cpp
--- src/slic3r/GUI/Mouse3DController.cpp.orig
+++ src/slic3r/GUI/Mouse3DController.cpp
@@ -146,7 +146,11 @@ static std::string detect_attached_device()
std::string ret;
// Initialize the hidapi library
+#ifdef __OpenBSD__
+ int res = hidapi_hid_init();
+#else
int res = hid_init();
+#endif
if (res != 0)
BOOST_LOG_TRIVIAL(error) << "Unable to initialize hidapi library";
else {
@@ -698,7 +702,11 @@ void Mouse3DController::shutdown()
void Mouse3DController::run()
{
// Initialize the hidapi library
+#ifdef __OpenBSD__
+ int res = hidapi_hid_init();
+#else
int res = hid_init();
+#endif
if (res != 0) {
// Give up.
#if defined(__unix__) || defined(__unix) || defined(unix)