compiles!!! (seg faults)
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
#ifdef GN_PLATFORM_LINUX
|
||||
#include "gryphn_platform_linux.h"
|
||||
#include "core/gryphn_rendering_api.h"
|
||||
#include "core/instance/init/gryphn_dynamic_library.h"
|
||||
#include "dlfcn.h"
|
||||
#include "gryphn_rendering_api.h"
|
||||
|
||||
gnRenderingAPI renderingAPIs[2] = {
|
||||
GN_RENDERINGAPI_VULKAN,
|
||||
@@ -14,19 +12,4 @@ gnRenderingAPI* gnGetSupportedRenderingAPIs(int* count) {
|
||||
return renderingAPIs;
|
||||
}
|
||||
|
||||
struct gnDynamicLibrary_t* gnLoadDynamicLibrary(const gnString path) {
|
||||
struct gnDynamicLibrary_t* dll = malloc(sizeof(struct gnDynamicLibrary_t));
|
||||
dll->dllPtr = dlopen(gnToCString(gnCombineStrings(path, ".so")), RTLD_LAZY),
|
||||
dll->isValid = gnTrue;
|
||||
if (dll->dllPtr == NULL) dll->isValid = gnFalse;
|
||||
return dll;
|
||||
}
|
||||
void* gnLoadFunctionPtr(struct gnDynamicLibrary_t* dll, const char* name) {
|
||||
if (dll->isValid == gnFalse) return NULL;
|
||||
return dlsym(dll->dllPtr, name);
|
||||
}
|
||||
void gnUnloadDynamicLibrary(struct gnDynamicLibrary_t* dll) {
|
||||
if (dll->isValid) dlclose(dll->dllPtr);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user