comparison src/video/SDL_video.c @ 1296:f418917e0b7a

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"); }
author Sam Lantinga <slouken@libsdl.org>
date Mon, 30 Jan 2006 13:30:44 +0000
parents a7bea6db3c3e
children c9b51268668f
comparison
equal deleted inserted replaced
1295:c3e36ac8a94c 1296:f418917e0b7a
641 } 641 }
642 642
643 /* Reset the keyboard here so event callbacks can run */ 643 /* Reset the keyboard here so event callbacks can run */
644 SDL_ResetKeyboard(); 644 SDL_ResetKeyboard();
645 SDL_ResetMouse(); 645 SDL_ResetMouse();
646 SDL_cursorstate &= ~CURSOR_USINGSW;
646 647
647 /* Clean up any previous video mode */ 648 /* Clean up any previous video mode */
648 if ( SDL_PublicSurface != NULL ) { 649 if ( SDL_PublicSurface != NULL ) {
649 SDL_PublicSurface = NULL; 650 SDL_PublicSurface = NULL;
650 } 651 }