tags:

views:

23

answers:

1

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, 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?

A: 

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.

Victor Marzo