Initialize the video mode before setting GL attributes
This commit is contained in:
@@ -58,7 +58,6 @@ int gl_start(int width, int height, int req_depth, int FullScreen)
|
||||
flags |= (cvidmode == 16 ? SDL_RESIZABLE : 0);
|
||||
flags |= (FullScreen ? SDL_FULLSCREEN : 0);
|
||||
|
||||
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
|
||||
|
||||
SurfaceX = width; SurfaceY = height;
|
||||
surface = SDL_SetVideoMode(SurfaceX, SurfaceY, req_depth, flags);
|
||||
@@ -69,6 +68,8 @@ int gl_start(int width, int height, int req_depth, int FullScreen)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
|
||||
|
||||
glvidbuffer = (unsigned short *) malloc(512 * 512 * sizeof(short));
|
||||
gl_clearwin();
|
||||
SDL_WarpMouse(SurfaceX / 4, SurfaceY / 4);
|
||||
|
||||
Reference in New Issue
Block a user