mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-06-28 09:59:41 -06:00
Linux: fix uiGLGetProcAddress()
This commit is contained in:
@ -29,5 +29,5 @@ add_library(core STATIC
|
|||||||
if (WIN32)
|
if (WIN32)
|
||||||
target_link_libraries(core ole32 comctl32 ws2_32 opengl32)
|
target_link_libraries(core ole32 comctl32 ws2_32 opengl32)
|
||||||
else()
|
else()
|
||||||
target_link_libraries(core GL)
|
target_link_libraries(core GL EGL)
|
||||||
endif()
|
endif()
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
#include "uipriv_unix.h"
|
#include "uipriv_unix.h"
|
||||||
|
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
|
#include <GL/glx.h>
|
||||||
void* glXGetProcAddressARB(const GLubyte* name);
|
#include <EGL/egl.h>
|
||||||
|
|
||||||
extern GThread* gtkthread;
|
extern GThread* gtkthread;
|
||||||
extern GMutex glmutex;
|
extern GMutex glmutex;
|
||||||
@ -220,12 +220,17 @@ void *uiGLGetProcAddress(const char* proc)
|
|||||||
{
|
{
|
||||||
// TODO: consider using epoxy or something funny
|
// TODO: consider using epoxy or something funny
|
||||||
|
|
||||||
void* ptr = dlsym(NULL /* RTLD_DEFAULT */, proc);
|
void* ptr;
|
||||||
if (ptr) return ptr;
|
|
||||||
|
|
||||||
ptr = glXGetProcAddressARB((const GLubyte*)proc);
|
ptr = glXGetProcAddressARB((const GLubyte*)proc);
|
||||||
if (ptr) return ptr;
|
if (ptr) return ptr;
|
||||||
|
|
||||||
|
ptr = eglGetProcAddress(proc);
|
||||||
|
if (ptr) return ptr;
|
||||||
|
|
||||||
|
ptr = dlsym(NULL /* RTLD_DEFAULT */, proc);
|
||||||
|
if (ptr) return ptr;
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
unsigned int uiGLGetVersion(uiGLContext* ctx)
|
unsigned int uiGLGetVersion(uiGLContext* ctx)
|
||||||
|
Reference in New Issue
Block a user