开发者

Calling SDL_SetVideoMode several times

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜