fix stale g_X11Display pointer causing crashes
This commit is contained in:
@@ -354,20 +354,6 @@ RageDisplay_OGL::RageDisplay_OGL( VideoModeParams p, bool bAllowUnacceleratedRen
|
|||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(unix)
|
|
||||||
{
|
|
||||||
SDL_SysWMinfo info;
|
|
||||||
SDL_VERSION(&info.version);
|
|
||||||
if ( SDL_GetWMInfo(&info) < 0 )
|
|
||||||
{
|
|
||||||
LOG->Warn("SDL_GetWMInfo failed: %s", SDL_GetError());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
g_X11Display = info.info.x11.display;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// Log driver details
|
// Log driver details
|
||||||
LOG->Info("OGL Vendor: %s", glGetString(GL_VENDOR));
|
LOG->Info("OGL Vendor: %s", glGetString(GL_VENDOR));
|
||||||
LOG->Info("OGL Renderer: %s", glGetString(GL_RENDERER));
|
LOG->Info("OGL Renderer: %s", glGetString(GL_RENDERER));
|
||||||
@@ -680,6 +666,19 @@ CString RageDisplay_OGL::TryVideoMode( VideoModeParams p, bool &bNewDeviceOut )
|
|||||||
TEXTUREMAN->InvalidateTextures();
|
TEXTUREMAN->InvalidateTextures();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(unix)
|
||||||
|
{
|
||||||
|
SDL_SysWMinfo info;
|
||||||
|
SDL_VERSION(&info.version);
|
||||||
|
|
||||||
|
g_X11Display = NULL;
|
||||||
|
if ( SDL_GetWMInfo(&info) < 0 )
|
||||||
|
LOG->Warn("SDL_GetWMInfo failed: %s", SDL_GetError());
|
||||||
|
else
|
||||||
|
g_X11Display = info.info.x11.display;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
this->SetDefaultRenderStates();
|
this->SetDefaultRenderStates();
|
||||||
DumpOpenGLDebugInfo();
|
DumpOpenGLDebugInfo();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user