X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=vid_glx.c;h=de1ac666dc29f00015a58f0553f11f7d28e0f4e8;hb=c9279ad2901cadff3086c3b83959e92430a5e46d;hp=04d6516ac50c4294fff924d9877747a822c4393f;hpb=da29a8beeb35293e2fd38b51883c91b5cf4cf4ad;p=xonotic%2Fdarkplaces.git diff --git a/vid_glx.c b/vid_glx.c index 04d6516a..de1ac666 100644 --- a/vid_glx.c +++ b/vid_glx.c @@ -434,13 +434,11 @@ static void HandleEvents(void) case MapNotify: // window restored vid_hidden = false; - vid_activewindow = false; VID_RestoreSystemGamma(); break; case UnmapNotify: // window iconified/rolledup/whatever vid_hidden = true; - vid_activewindow = false; VID_RestoreSystemGamma(); break; case FocusIn: @@ -493,7 +491,7 @@ static int GL_OpenLibrary(const char *name) Con_Printf("Unable to open symbol list for %s\n", name); return false; } - strcpy(gl_driver, name); + strlcpy(gl_driver, name, sizeof(gl_driver)); return true; } @@ -614,7 +612,7 @@ void VID_Init(void) mouse_avail = false; } -void VID_BuildGLXAttrib(int *attrib, int stencil) +void VID_BuildGLXAttrib(int *attrib, qboolean stencil, qboolean stereobuffer) { *attrib++ = GLX_RGBA; *attrib++ = GLX_RED_SIZE;*attrib++ = 1; @@ -628,10 +626,12 @@ void VID_BuildGLXAttrib(int *attrib, int stencil) *attrib++ = GLX_STENCIL_SIZE;*attrib++ = 8; *attrib++ = GLX_ALPHA_SIZE;*attrib++ = 1; } + if (stereobuffer) + *attrib++ = GLX_STEREO; *attrib++ = None; } -int VID_InitMode(int fullscreen, int width, int height, int bpp, int refreshrate) +int VID_InitMode(int fullscreen, int width, int height, int bpp, int refreshrate, int stereobuffer) { int i; int attrib[32]; @@ -689,7 +689,7 @@ int VID_InitMode(int fullscreen, int width, int height, int bpp, int refreshrate return false; } - VID_BuildGLXAttrib(attrib, bpp == 32); + VID_BuildGLXAttrib(attrib, bpp == 32, stereobuffer); visinfo = qglXChooseVisual(vidx11_display, vidx11_screen, attrib); if (!visinfo) {