Skip to content
Permalink
Browse files

Fixed crash:

#include <SDL.h>

int main(int argc, char** argv)
{
        SDL_Init(SDL_INIT_EVERYTHING);
        SDL_SetVideoMode(640, 480, 0, SDL_FULLSCREEN);
        SDL_ShowCursor(SDL_DISABLE);
        SDL_Delay(1000);
        SDL_SetVideoMode(640, 480, 0, SDL_FULLSCREEN | SDL_OPENGL);
        SDL_Quit();
        printf("Everything okay\n");
}
  • Loading branch information
slouken committed Jan 30, 2006
1 parent 49ed6d7 commit 0b9a5b1ecbcf41f94b072e426e5df61bc2a6f828

File 2 of 2 in 0b9a5b1

@@ -643,6 +643,7 @@ SDL_Surface * SDL_SetVideoMode (int width, int height, int bpp, Uint32 flags)
/* Reset the keyboard here so event callbacks can run */
SDL_ResetKeyboard();
SDL_ResetMouse();
SDL_cursorstate &= ~CURSOR_USINGSW;

/* Clean up any previous video mode */
if ( SDL_PublicSurface != NULL ) {

0 comments on commit 0b9a5b1

Please sign in to comment.