Move variable definition to conform to glfw C standard.

This commit is contained in:
Doug Binks 2018-10-12 12:00:43 +01:00
parent debabe815e
commit 832342cc0f

View File

@ -143,6 +143,7 @@ static int choosePixelFormat(_GLFWwindow* window,
_GLFWfbconfig* usableConfigs; _GLFWfbconfig* usableConfigs;
const _GLFWfbconfig* closest; const _GLFWfbconfig* closest;
int i, pixelFormat, nativeCount, usableCount; int i, pixelFormat, nativeCount, usableCount;
int pixelFormatAttribs[GLFW_PFA_COUNT];
if (_glfw.wgl.ARB_pixel_format) if (_glfw.wgl.ARB_pixel_format)
{ {
@ -169,7 +170,6 @@ static int choosePixelFormat(_GLFWwindow* window,
if (_glfw.wgl.ARB_pixel_format) if (_glfw.wgl.ARB_pixel_format)
{ {
// Get pixel format attributes through "modern" extension // Get pixel format attributes through "modern" extension
int pixelFormatAttribs[GLFW_PFA_COUNT];
getPixelFormatAttribs(window, n, pixelFormatAttribs ); getPixelFormatAttribs(window, n, pixelFormatAttribs );
if (!pixelFormatAttribs[GLFW_PFA_WGL_SUPPORT_OPENGL_ARB] || if (!pixelFormatAttribs[GLFW_PFA_WGL_SUPPORT_OPENGL_ARB] ||