mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-21 06:14:10 +00:00
Added debug output when dynamic library load fails
This commit is contained in:
parent
8ae528efe0
commit
fd75f7a959
1 changed files with 11 additions and 2 deletions
|
|
@ -3277,11 +3277,19 @@ int extgl_Initialize()
|
|||
int extgl_Open()
|
||||
{
|
||||
lib_gl_handle = dlopen("libGL.so.1", RTLD_LAZY | RTLD_GLOBAL);
|
||||
if (lib_gl_handle == NULL)
|
||||
if (lib_gl_handle == NULL) {
|
||||
#ifdef _DEBUG
|
||||
printf("Error loading libGL.so.1: %s\n", dlerror());
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
lib_glu_handle = dlopen("libGLU.so.1", RTLD_LAZY | RTLD_GLOBAL);
|
||||
if (lib_glu_handle == NULL)
|
||||
if (lib_glu_handle == NULL) {
|
||||
#ifdef _DEBUG
|
||||
printf("Error loading libGLU.so.1: %s\n", dlerror());
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -3323,6 +3331,7 @@ int extgl_Open(void)
|
|||
void extgl_Close(void)
|
||||
{
|
||||
#ifdef _X11
|
||||
printf("closing handles\n");
|
||||
dlclose(lib_glu_handle);
|
||||
dlclose(lib_gl_handle);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue