windows: Attempt to make Visual Studio not hardcode a call to memset().

Ryan C. Gordon 2017-08-25 15:16:39 -04:00
parent e58c7920bf
commit 73f866cf0a
1 changed files with 7 additions and 7 deletions

View File

@ -728,13 +728,13 @@ WIN_GL_CreateContext(_THIS, SDL_Window * window)
SDL_SetError("GL 3.x is not supported"); SDL_SetError("GL 3.x is not supported");
context = temp_context; context = temp_context;
} else { } else {
/* max 14 attributes plus terminator */ int attribs[15]; /* max 14 attributes plus terminator */
int attribs[15] = { int iattr = 0;
WGL_CONTEXT_MAJOR_VERSION_ARB, _this->gl_config.major_version,
WGL_CONTEXT_MINOR_VERSION_ARB, _this->gl_config.minor_version, attribs[iattr++] = WGL_CONTEXT_MAJOR_VERSION_ARB;
0 attribs[iattr++] = _this->gl_config.major_version;
}; attribs[iattr++] = WGL_CONTEXT_MINOR_VERSION_ARB;
int iattr = 4; attribs[iattr++] = _this->gl_config.minor_version;
/* SDL profile bits match WGL profile bits */ /* SDL profile bits match WGL profile bits */
if (_this->gl_config.profile_mask != 0) { if (_this->gl_config.profile_mask != 0) {