Is it ok to do the following?
SDL_Surface* screen;
screen = SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, SDL_SWSURFACE | SDL_RESIZABLE | SDL_FULLSCREEN );
screen = SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT开发者_Python百科, SCREEN_BPP, SDL_SWSURFACE | SDL_RESIZABLE );
screen = SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, SDL_SWSURFACE | SDL_RESIZABLE | SDL_FULLSCREEN );
I don't need to clean up the surface before each call?
The only way to toggle fullscreen on Windows is to call SDL_SetVideoMode again. You have not to free the screen surface.
Be careful, you may lost the hardware surfaces.
精彩评论