Crashfix for ZZogl / ZeroGSogl. Thanks "jur".

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2825 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
ramapcsx2 2010-04-08 21:58:14 +00:00
parent e28aeacf56
commit a57761c934
2 changed files with 11 additions and 1 deletions

View File

@ -107,6 +107,11 @@ void GLWindow::DisplayWindow(int _width, int _height)
doubleBuffered = true; doubleBuffered = true;
ERROR_LOG("Got Doublebuffered Visual!\n"); ERROR_LOG("Got Doublebuffered Visual!\n");
} }
if (vi == NULL)
{
ERROR_LOG("Failed to get buffered Visual!\n");
return false;
}
glXQueryVersion(glDisplay, &glxMajorVersion, &glxMinorVersion); glXQueryVersion(glDisplay, &glxMajorVersion, &glxMinorVersion);
ERROR_LOG("glX-Version %d.%d\n", glxMajorVersion, glxMinorVersion); ERROR_LOG("glX-Version %d.%d\n", glxMajorVersion, glxMinorVersion);

View File

@ -111,12 +111,17 @@ bool GLWindow::DisplayWindow(int _width, int _height)
doubleBuffered = true; doubleBuffered = true;
ERROR_LOG("Got Doublebuffered Visual!\n"); ERROR_LOG("Got Doublebuffered Visual!\n");
} }
if (vi == NULL)
{
ERROR_LOG("Failed to get buffered Visual!\n");
return false;
}
glXQueryVersion(glDisplay, &glxMajorVersion, &glxMinorVersion); glXQueryVersion(glDisplay, &glxMajorVersion, &glxMinorVersion);
ERROR_LOG("glX-Version %d.%d\n", glxMajorVersion, glxMinorVersion); ERROR_LOG("glX-Version %d.%d\n", glxMajorVersion, glxMinorVersion);
/* create a GLX context */ /* create a GLX context */
context = glXCreateContext(glDisplay, vi, 0, GL_TRUE); context = glXCreateContext(glDisplay, vi, NULL, GL_TRUE);
/* create a color map */ /* create a color map */
cmap = XCreateColormap(glDisplay, RootWindow(glDisplay, vi->screen), cmap = XCreateColormap(glDisplay, RootWindow(glDisplay, vi->screen),