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

GLX/GL drivers).
This commit is contained in:
Raphael Junqueira 2004-04-23 21:27:30 +00:00 committed by Alexandre Julliard
parent 223fcdff77
commit b42da1c51c
1 changed files with 8 additions and 5 deletions

View File

@ -724,11 +724,14 @@ static void IDirect3D8Impl_FillGLCaps(LPDIRECT3D8 iface, Display* display) {
if (This->gl_info.bIsFilled) return ; if (This->gl_info.bIsFilled) return ;
This->gl_info.bIsFilled = 1; This->gl_info.bIsFilled = 1;
test = glXQueryVersion(NULL, &major, &minor); if (NULL != display) {
This->gl_info.glx_version = ((major & 0x0000FFFF) << 16) | (minor & 0x0000FFFF); test = glXQueryVersion(NULL, &major, &minor);
This->gl_info.glx_version = ((major & 0x0000FFFF) << 16) | (minor & 0x0000FFFF);
gl_string = glXGetClientString(NULL, GLX_VENDOR); gl_string = glXGetClientString(NULL, GLX_VENDOR);
} else {
gl_string = glGetString(GL_VENDOR);
}
if (strstr(gl_string, "NVIDIA")) { if (strstr(gl_string, "NVIDIA")) {
This->gl_info.gl_vendor = VENDOR_NVIDIA; This->gl_info.gl_vendor = VENDOR_NVIDIA;
} else if (strstr(gl_string, "ATI")) { } else if (strstr(gl_string, "ATI")) {