From 73f866cf0ab32ecb712b089213bdbfde60fd960f Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Fri, 25 Aug 2017 15:16:39 -0400 Subject: [PATCH] windows: Attempt to make Visual Studio not hardcode a call to memset(). --- src/video/windows/SDL_windowsopengl.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/video/windows/SDL_windowsopengl.c b/src/video/windows/SDL_windowsopengl.c index 9398ded661bea..ae5e455d9ace1 100644 --- a/src/video/windows/SDL_windowsopengl.c +++ b/src/video/windows/SDL_windowsopengl.c @@ -728,13 +728,13 @@ WIN_GL_CreateContext(_THIS, SDL_Window * window) SDL_SetError("GL 3.x is not supported"); context = temp_context; } else { - /* max 14 attributes plus terminator */ - int attribs[15] = { - WGL_CONTEXT_MAJOR_VERSION_ARB, _this->gl_config.major_version, - WGL_CONTEXT_MINOR_VERSION_ARB, _this->gl_config.minor_version, - 0 - }; - int iattr = 4; + int attribs[15]; /* max 14 attributes plus terminator */ + int iattr = 0; + + attribs[iattr++] = WGL_CONTEXT_MAJOR_VERSION_ARB; + attribs[iattr++] = _this->gl_config.major_version; + attribs[iattr++] = WGL_CONTEXT_MINOR_VERSION_ARB; + attribs[iattr++] = _this->gl_config.minor_version; /* SDL profile bits match WGL profile bits */ if (_this->gl_config.profile_mask != 0) {