retry wglMakeCurrent at least once
This commit is contained in:
parent
e3b81f8250
commit
3ef9e29a8b
1 changed files with 9 additions and 1 deletions
|
@ -54,7 +54,15 @@ DWORD WINAPI ogl_render_main(void)
|
||||||
Sleep(250);
|
Sleep(250);
|
||||||
g_ogl.got_error = g_ogl.use_opengl = FALSE;
|
g_ogl.got_error = g_ogl.use_opengl = FALSE;
|
||||||
|
|
||||||
if (xwglMakeCurrent(g_ogl.hdc, g_ogl.context) && glGetError() == GL_NO_ERROR)
|
BOOL made_current = xwglMakeCurrent(g_ogl.hdc, g_ogl.context);
|
||||||
|
if (!made_current)
|
||||||
|
{
|
||||||
|
/* make sure we retry at least once */
|
||||||
|
Sleep(50);
|
||||||
|
made_current = xwglMakeCurrent(g_ogl.hdc, g_ogl.context);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (made_current && glGetError() == GL_NO_ERROR)
|
||||||
{
|
{
|
||||||
oglu_init();
|
oglu_init();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue