X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fx11%2Ffg_state_x11.c;fp=src%2Fx11%2Ffg_state_x11.c;h=206478f718ea40f60f3276f607a22060dba76120;hb=55a8bc593affc3565d63453d35773cdbf1046216;hp=3aa19b1a7f9e56caa1bc3e9d57090e41d293aa86;hpb=66c3564a4405b7125bc9d4904972ce465a4b668b;p=freeglut diff --git a/src/x11/fg_state_x11.c b/src/x11/fg_state_x11.c index 3aa19b1..206478f 100644 --- a/src/x11/fg_state_x11.c +++ b/src/x11/fg_state_x11.c @@ -155,6 +155,7 @@ int fgPlatformGlutGet ( GLenum eWhat ) else { XVisualInfo * visualInfo; + int result; #ifdef EGL_VERSION_1_0 EGLint vid = 0; XVisualInfo visualTemplate; @@ -166,13 +167,15 @@ int fgPlatformGlutGet ( GLenum eWhat ) visualTemplate.visualid = vid; visualInfo = XGetVisualInfo(fgDisplay.pDisplay.Display, VisualIDMask, &visualTemplate, &num_visuals); #else + { const GLXFBConfig fbconfig = fgStructure.CurrentWindow->Window.pContext.FBConfig; visualInfo = glXGetVisualFromFBConfig( fgDisplay.pDisplay.Display, fbconfig ); + } #endif - const int result = visualInfo->visual->map_entries; + result = visualInfo->visual->map_entries; XFree(visualInfo);