Skip to content

Instantly share code, notes, and snippets.

@gort818
Created December 18, 2022 17:01
Show Gist options
  • Save gort818/ba96471c82832fc9201444dfff78f70b to your computer and use it in GitHub Desktop.
Save gort818/ba96471c82832fc9201444dfff78f70b to your computer and use it in GitHub Desktop.
diff --git a/src/gl/gl_hud.cpp b/src/gl/gl_hud.cpp
index 12d8e8c..4727313 100644
--- a/src/gl/gl_hud.cpp
+++ b/src/gl/gl_hud.cpp
@@ -117,8 +117,14 @@ void imgui_create(void *ctx)
return;
imgui_shutdown();
- imgui_init();
- inited = true;
+ char* driver_override = getenv("MESA_LOADER_DRIVER_OVERRIDE");
+ if (driver_override && strcmp(driver_override, "zink") == 0) {
+ return;
+ }
+ else {
+ imgui_init();
+ inited = true;
+ }
if (!gladLoadGL())
spdlog::error("Failed to initialize OpenGL context, crash incoming");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment