winex11: Improved error handling in pglXMakeCurrent() call.

This commit is contained in:
Joshua Beck 2011-03-24 01:50:33 -05:00 committed by Alexandre Julliard
parent 6771ed40e8
commit ddada67538
1 changed files with 5 additions and 2 deletions

View File

@ -344,8 +344,11 @@ static BOOL X11DRV_WineGL_InitOpenglInfo(void)
else
win = root;
pglXMakeCurrent(gdi_display, win, ctx);
if(pglXMakeCurrent(gdi_display, win, ctx) == 0)
{
ERR_(winediag)( "Unable to activate OpenGL context, most likely your OpenGL drivers haven't been installed correctly\n" );
goto done;
}
WineGLInfo.glVersion = (const char *) pglGetString(GL_VERSION);
str = (const char *) pglGetString(GL_EXTENSIONS);
WineGLInfo.glExtensions = HeapAlloc(GetProcessHeap(), 0, strlen(str)+1);