2010-07-16 53 views
0

可以執行以下操作嗎?幾次調用SDL_SetVideoMode

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); 

我不需要在每次調用之前清理表面?

回答

1

在Windows上切換全屏的唯一方法是再次調用SDL_SetVideoMode。你有沒有釋放屏幕表面。

要小心,您可能會丟失硬件表面。