Skip to content

Commit

Permalink
gl: better test to detect the nouveau driver
Browse files Browse the repository at this point in the history
GL_VENDOR=nouveau or GL_RENDERER=NVE4 (case insensitive)
Issue flyinghead#1373
  • Loading branch information
flyinghead committed Jan 22, 2024
1 parent 8fd6fef commit 07d6ca6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/rend/gles/gles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
;
Expand Down

0 comments on commit 07d6ca6

Please sign in to comment.