fix(EGL): Handle window recreations with different APIs

Should fix Mojang Vulkan falling back to opengl
This commit is contained in:
tomikun
2026-04-21 02:52:07 +08:00
parent 4d57d4960a
commit b86fe17c82

View File

@@ -209,6 +209,12 @@ EXTERNAL_API void pojavSetWindowHint(int hint, int value) {
// pojavInitVulkan();
break;
case GLFW_OPENGL_API:
const char *renderer = getenv("AMETHYST_RENDERER");
if (strncmp("opengles", renderer, 8) == 0) {
pojav_environ->config_renderer = RENDERER_GL4ES;
} else if (strcmp(renderer, "vulkan_zink") == 0) {
pojav_environ->config_renderer = RENDERER_VK_ZINK;
}
/* Nothing to do: initialization is called in pojavCreateContext */
// pojavInitOpenGL();
break;