shithub: choc

Download patch

ref: ab134749048360f18e829a34775716d713b7430b
parent: e59bb5f2e0e4657c078d1eaabce2da1859122a22
parent: 3656db42047ce9e99a2aa984d54650b7cf54073f
author: Jonathan Dowland <jon+github@alcopop.org>
date: Mon Apr 16 19:14:39 EDT 2018

Merge pull request #1024 from jmtd/825-delete-swgl-check

Remove the unreliable Software GL check

--- a/src/i_video.c
+++ b/src/i_video.c
@@ -1310,30 +1310,6 @@
     CreateUpscaledTexture(true);
 }
 
-static const char *hw_emu_warning = 
-"===========================================================================\n"
-"WARNING: it looks like you are using a software GL implementation.\n"
-"To improve performance, try setting force_software_renderer in your\n"
-"configuration file.\n"
-"===========================================================================\n";
-
-static void CheckGLVersion(void)
-{
-    const char * version;
-    typedef const GLubyte* (APIENTRY * glStringFn_t)(GLenum);
-    glStringFn_t glfp = (glStringFn_t)SDL_GL_GetProcAddress("glGetString");
-
-    if (glfp)
-    {
-        version = (const char *)glfp(GL_VERSION);
-
-        if (version && strstr(version, "Mesa"))
-        {
-            printf("%s", hw_emu_warning);
-        }
-    }
-}
-
 void I_InitGraphics(void)
 {
     SDL_Event dummy;
@@ -1384,10 +1360,6 @@
     // on configuration.
     AdjustWindowSize();
     SetVideoMode();
-
-    // We might have poor performance if we are using an emulated
-    // HW accelerator. Check for Mesa and warn if we're using it.
-    CheckGLVersion();
 
     // Start with a clear black screen
     // (screen will be flipped after we set the palette)