src/video/windows/SDL_windowsopengl.c
changeset 11351 9e5dc03870e1
parent 11347 7f254d0b7842
child 11811 5d94cb6b24d3
     1.1 --- a/src/video/windows/SDL_windowsopengl.c	Fri Aug 25 12:51:42 2017 -0400
     1.2 +++ b/src/video/windows/SDL_windowsopengl.c	Fri Aug 25 15:16:39 2017 -0400
     1.3 @@ -728,13 +728,13 @@
     1.4              SDL_SetError("GL 3.x is not supported");
     1.5              context = temp_context;
     1.6          } else {
     1.7 -        /* max 14 attributes plus terminator */
     1.8 -            int attribs[15] = {
     1.9 -                WGL_CONTEXT_MAJOR_VERSION_ARB, _this->gl_config.major_version,
    1.10 -                WGL_CONTEXT_MINOR_VERSION_ARB, _this->gl_config.minor_version,
    1.11 -                0
    1.12 -            };
    1.13 -            int iattr = 4;
    1.14 +            int attribs[15];  /* max 14 attributes plus terminator */
    1.15 +            int iattr = 0;
    1.16 +
    1.17 +            attribs[iattr++] = WGL_CONTEXT_MAJOR_VERSION_ARB;
    1.18 +            attribs[iattr++] = _this->gl_config.major_version;
    1.19 +            attribs[iattr++] = WGL_CONTEXT_MINOR_VERSION_ARB;
    1.20 +            attribs[iattr++] = _this->gl_config.minor_version;
    1.21  
    1.22              /* SDL profile bits match WGL profile bits */
    1.23              if (_this->gl_config.profile_mask != 0) {