X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=vid_agl.c;h=de1775c235d5a0b53ff9fe86a5fc75fb0dc411b8;hp=8a765011f38241ef3d58e785470b8f42a0205eda;hb=bf7fdc26371e2823650c8af6d78ef1e28513f7eb;hpb=da29a8beeb35293e2fd38b51883c91b5cf4cf4ad diff --git a/vid_agl.c b/vid_agl.c index 8a765011..de1775c2 100644 --- a/vid_agl.c +++ b/vid_agl.c @@ -257,7 +257,7 @@ static int GL_OpenLibrary(void) 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; } @@ -360,7 +360,7 @@ static void VID_ProcessPendingAsyncEvents (void) Sys_Quit(); } -static void VID_BuildAGLAttrib(GLint *attrib, qboolean stencil, qboolean fullscreen) +static void VID_BuildAGLAttrib(GLint *attrib, qboolean stencil, qboolean fullscreen, qboolean stereobuffer) { *attrib++ = AGL_RGBA; *attrib++ = AGL_RED_SIZE;*attrib++ = 1; @@ -377,10 +377,12 @@ static void VID_BuildAGLAttrib(GLint *attrib, qboolean stencil, qboolean fullscr } if (fullscreen) *attrib++ = AGL_FULLSCREEN; + if (stereobuffer) + *attrib++ = AGL_STEREO; *attrib++ = AGL_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) { const EventTypeSpec winEvents[] = { @@ -445,7 +447,7 @@ int VID_InitMode(int fullscreen, int width, int height, int bpp, int refreshrate GetEventTypeCount(winEvents), winEvents, window, NULL); // Create the desired attribute list - VID_BuildAGLAttrib(attributes, bpp == 32, fullscreen); + VID_BuildAGLAttrib(attributes, bpp == 32, fullscreen, stereobuffer); if (!fullscreen) {