Skip to content

Commit

Permalink
windows: Attempt to make Visual Studio not hardcode a call to memset().
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Aug 25, 2017
1 parent e58c792 commit 73f866c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/video/windows/SDL_windowsopengl.c
Expand Up @@ -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) {
Expand Down

0 comments on commit 73f866c

Please sign in to comment.