Fix some random crashes found on some games in the new code (live
GLX/GL drivers).
This commit is contained in:
parent
223fcdff77
commit
b42da1c51c
|
@ -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")) {
|
||||||
|
|
Loading…
Reference in New Issue