From cca366552519495e120ce798e1dd82930f4f16a2 Mon Sep 17 00:00:00 2001 From: Jaime Passos <lazymyuutsu@gmail.com> Date: Sat, 15 Feb 2020 13:51:32 -0300 Subject: [PATCH] Fallback to Software if the renderer version doesn't match --- src/sdl/i_video.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index a37e94fad4..4b30fc6767 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -1803,13 +1803,19 @@ void I_StartupHardwareGraphics(void) HWD.pfnMakeScreenFinalTexture=hwSym("MakeScreenFinalTexture",NULL); HWD.pfnDrawScreenFinalTexture=hwSym("DrawScreenFinalTexture",NULL); - if (!HWD.pfnInit(I_Error)) // let load the OpenGL library + if (HWD.pfnGetRenderVersion() != VERSION) + { + CONS_Alert(CONS_ERROR, M_GetText("The version of the renderer doesn't match the version of the executable\nBe sure you have installed SRB2 properly.\n")); + hwrenderloaded = false; + } + else + hwrenderloaded = HWD.pfnInit(I_Error); // let load the OpenGL library + + if (!hwrenderloaded) { rendermode = render_soft; setrenderneeded = 0; } - else - hwrenderloaded = true; glstartup = true; } #endif -- GitLab