开发者

Calling SDL_SetVideoMode several times

开发者 https://www.devze.com 2023-01-08 02:13 出处:网络
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 );

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消