Commit b42da1c5 authored by Raphael Junqueira's avatar Raphael Junqueira Committed by Alexandre Julliard

Fix some random crashes found on some games in the new code (live

GLX/GL drivers).
parent 223fcdff
......@@ -724,11 +724,14 @@ static void IDirect3D8Impl_FillGLCaps(LPDIRECT3D8 iface, Display* display) {
if (This->gl_info.bIsFilled) return ;
This->gl_info.bIsFilled = 1;
test = glXQueryVersion(NULL, &major, &minor);
This->gl_info.glx_version = ((major & 0x0000FFFF) << 16) | (minor & 0x0000FFFF);
gl_string = glXGetClientString(NULL, GLX_VENDOR);
if (NULL != display) {
test = glXQueryVersion(NULL, &major, &minor);
This->gl_info.glx_version = ((major & 0x0000FFFF) << 16) | (minor & 0x0000FFFF);
gl_string = glXGetClientString(NULL, GLX_VENDOR);
} else {
gl_string = glGetString(GL_VENDOR);
}
if (strstr(gl_string, "NVIDIA")) {
This->gl_info.gl_vendor = VENDOR_NVIDIA;
} else if (strstr(gl_string, "ATI")) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment