Browse Source

Backends: OpenGL3: fixed GL loader to work on Haiku OS which does not support. (#8952)

ocornut 2 weeks ago
parent
commit
301e652376
2 changed files with 6 additions and 0 deletions
  1. 4 0
      backends/imgui_impl_opengl3_loader.h
  2. 2 0
      docs/CHANGELOG.txt

+ 4 - 0
backends/imgui_impl_opengl3_loader.h

@@ -714,7 +714,11 @@ static void close_libgl(void)
 
 
 static int is_library_loaded(const char* name, void** lib)
 static int is_library_loaded(const char* name, void** lib)
 {
 {
+#if defined(__HAIKU__)
+    *lib = NULL; // no support for RTLD_NOLOAD on Haiku.
+#else
     *lib = dlopen(name, RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD);
     *lib = dlopen(name, RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD);
+#endif
     return *lib != NULL;
     return *lib != NULL;
 }
 }
 
 

+ 2 - 0
docs/CHANGELOG.txt

@@ -52,6 +52,8 @@ Other Changes:
 - Backends: all backends call ImGuiPlatformIO::ClearPlatformHandlers() and
 - Backends: all backends call ImGuiPlatformIO::ClearPlatformHandlers() and
   ClearRendererHandlers() on shutdown, so as not to leave function pointers
   ClearRendererHandlers() on shutdown, so as not to leave function pointers
   which may be dangling when using backend in e.g. DLL. (#8945, #2769)
   which may be dangling when using backend in e.g. DLL. (#8945, #2769)
+- Backends: OpenGL3: fixed GL loader to work on Haiku OS which does not support
+  `RTLD_NOLOAD`. (#8952) [@Xottab-DUTY]
 
 
 
 
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------