------------------------------------------------------------------------
r4213 | acceptthis | 2013-02-17 18:22:59 +0000 (Sun, 17 Feb 2013) | 1 line Try to use a default display if all else fails. ------------------------------------------------------------------------ git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4210 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
27eea2a788
commit
55cb101be1
2 changed files with 8 additions and 1 deletions
|
@ -189,6 +189,8 @@ qboolean EGL_Init (rendererstate_t *info, unsigned char *palette, EGLNativeWindo
|
|||
}
|
||||
*/
|
||||
egldpy = qeglGetDisplay(dpy);
|
||||
if (egldpy == EGL_NO_DISPLAY)
|
||||
egldpy = qeglGetDisplay(EGL_DEFAULT_DISPLAY);
|
||||
if (egldpy == EGL_NO_DISPLAY)
|
||||
{
|
||||
Con_Printf(CON_ERROR "EGL: can't get display!\n");
|
||||
|
|
|
@ -1483,7 +1483,12 @@ qboolean X11VID_Init (rendererstate_t *info, unsigned char *palette, int psl)
|
|||
break;
|
||||
#ifdef USE_EGL
|
||||
case PSL_EGL:
|
||||
EGL_Init(info, palette, vid_window, vid_dpy);
|
||||
if (!EGL_Init(info, palette, vid_window, vid_dpy))
|
||||
{
|
||||
Con_Printf("Failed to create EGL context.\n");
|
||||
GLVID_Shutdown();
|
||||
return false;
|
||||
}
|
||||
GL_Init(&EGL_Proc);
|
||||
break;
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue