added mac support to frei0r
This commit is contained in:
@@ -6,7 +6,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 __linux__
|
||||
#elif defined(__linux__) || defined(__APPLE__)
|
||||
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";
|
||||
@@ -17,9 +17,7 @@ ModulePtr LibLoad(const QString &filename) {
|
||||
QStringList LibFilter() {
|
||||
#ifdef _WIN32
|
||||
return QStringList("*.dll");
|
||||
#elif __linux__
|
||||
return QStringList("*.so");
|
||||
#elif __APPLE__
|
||||
return QStringList("*.dylib");
|
||||
#elif defined(__linux__) || defined(__APPLE__)
|
||||
return {"*.so", "*.dylib"};
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#define LibAddress GetProcAddress
|
||||
#define LibClose FreeModule
|
||||
#define ModulePtr HMODULE
|
||||
#elif __linux__
|
||||
#elif defined(__linux__) || defined(__APPLE__)
|
||||
#include <dlfcn.h>
|
||||
#define LibAddress dlsym
|
||||
#define LibClose dlclose
|
||||
|
||||
Reference in New Issue
Block a user