This commit is contained in:
itsmattkc
2019-03-05 20:47:46 -08:00
5 changed files with 8 additions and 6 deletions
+2 -2
View File
@@ -26,7 +26,7 @@ ModulePtr LibLoad(const QString &filename) {
#ifdef _WIN32
LPCWSTR dll_fn_w = reinterpret_cast<const wchar_t*>(filename.utf16());
return LoadLibrary(dll_fn_w);
#elif defined(__linux__) || defined(__APPLE__)
#elif defined(__linux__) || defined(__APPLE__) || defined(__HAIKU__)
return dlopen(filename.toUtf8(), RTLD_LAZY);
#else
qWarning() << "Olive doesn't know how to open dynamic libraries on this platform, external libraries will not be functional";
@@ -37,7 +37,7 @@ ModulePtr LibLoad(const QString &filename) {
QStringList LibFilter() {
#ifdef _WIN32
return QStringList("*.dll");
#elif defined(__linux__) || defined(__APPLE__)
#elif defined(__linux__) || defined(__APPLE__) || defined(__HAIKU__)
return {"*.so", "*.dylib"};
#endif
}
+1 -1
View File
@@ -28,7 +28,7 @@
#define LibAddress GetProcAddress
#define LibClose FreeModule
#define ModulePtr HMODULE
#elif defined(__linux__) || defined(__APPLE__)
#elif defined(__linux__) || defined(__APPLE__) || defined(__HAIKU__)
#include <dlfcn.h>
#define LibAddress dlsym
#define LibClose dlclose