mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-21 18:10:26 +01:00
fixup! don't rebuild GL context to toggle fullscreen
This commit is contained in:
parent
09b48d1176
commit
08c77c602c
|
@ -1038,9 +1038,15 @@ int SubMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int
|
|||
(enum DisplayDepth)sam_iDisplayDepth, !sam_bFullScreenActive);
|
||||
#else
|
||||
int res = SDL_SetWindowFullscreen((SDL_Window *) _hwndMain, sam_bFullScreenActive ? 0 : SDL_WINDOW_FULLSCREEN);
|
||||
if (res == 0)
|
||||
if (res == 0) {
|
||||
sam_bFullScreenActive = !sam_bFullScreenActive;
|
||||
else
|
||||
char achWindowTitle[256];
|
||||
if (sam_bFullScreenActive)
|
||||
SDL_snprintf( achWindowTitle, sizeof (achWindowTitle), TRANS("Serious Sam (FullScreen %dx%d)"), sam_iScreenSizeI, sam_iScreenSizeJ);
|
||||
else
|
||||
SDL_snprintf( achWindowTitle, sizeof (achWindowTitle), TRANS("Serious Sam (Window %dx%d)"), sam_iScreenSizeI, sam_iScreenSizeJ);
|
||||
SDL_SetWindowTitle((SDL_Window *) _hwndMain, achWindowTitle);
|
||||
} else
|
||||
CPrintF("Can't toggle full-screen : %s\n", SDL_GetError());
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user