From 07d6ca6c846ec40ff7f78cbf9f669e70afc956d1 Mon Sep 17 00:00:00 2001 From: Flyinghead Date: Mon, 22 Jan 2024 09:18:17 +0100 Subject: [PATCH] gl: better test to detect the nouveau driver GL_VENDOR=nouveau or GL_RENDERER=NVE4 (case insensitive) Issue #1373 --- core/rend/gles/gles.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/rend/gles/gles.cpp b/core/rend/gles/gles.cpp index b6ce618c56..08df2859de 100644 --- a/core/rend/gles/gles.cpp +++ b/core/rend/gles/gles.cpp @@ -573,7 +573,8 @@ void findGLVersion() glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY, &gl.max_anisotropy); } #endif - gl.mesa_nouveau = strstr((const char *)glGetString(GL_VERSION), "Mesa") != nullptr && !strcmp((const char *)glGetString(GL_VENDOR), "nouveau"); + gl.mesa_nouveau = !stricmp((const char *)glGetString(GL_VENDOR), "nouveau") + || !stricmp((const char *)glGetString(GL_RENDERER), "NVE4"); NOTICE_LOG(RENDERER, "OpenGL%s version %d.%d", gl.is_gles ? " ES" : "", gl.gl_major, gl.gl_minor); while (glGetError() != GL_NO_ERROR) ;