From 0d8338f74330fefdfbd33b2192cc794e5a27b164 Mon Sep 17 00:00:00 2001 From: Jupeyy Date: Wed, 30 Mar 2022 14:53:53 +0200 Subject: [PATCH] Try default opengl settings first, when vulkan fails --- src/engine/client/backend_sdl.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/engine/client/backend_sdl.cpp b/src/engine/client/backend_sdl.cpp index 0168e0dd0..e7c186550 100644 --- a/src/engine/client/backend_sdl.cpp +++ b/src/engine/client/backend_sdl.cpp @@ -885,6 +885,15 @@ int CGraphicsBackend_SDL_GL::Init(const char *pName, int *pScreen, int *pWidth, { if(m_BackendType == BACKEND_TYPE_VULKAN) { + // try default opengl settings + str_copy(g_Config.m_GfxBackend, "OpenGL", std::size(g_Config.m_GfxBackend)); + g_Config.m_GfxGLMajor = 3; + g_Config.m_GfxGLMinor = 0; + g_Config.m_GfxGLPatch = 0; + // do another analysis round too, just in case + g_Config.m_Gfx3DTextureAnalysisDone = 0; + g_Config.m_GfxDriverIsBlocked = 0; + SDL_setenv("DDNET_DRIVER", "OpenGL", 1); m_BackendType = DetectBackend(); }