From: fgsfds Date: Wed, 7 Feb 2018 23:41:45 +0000 (+0300) Subject: temp hackfix for resolution changing X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=c5bd8da6bf297567dffd050202ce219a7821a8eb;p=d2df-sdl.git temp hackfix for resolution changing --- diff --git a/src/game/g_window.pas b/src/game/g_window.pas index f7f06d8..e7f0db3 100644 --- a/src/game/g_window.pas +++ b/src/game/g_window.pas @@ -105,7 +105,7 @@ begin e_WriteLog('Setting display mode...', TMsgType.Notify); wFlags := SDL_WINDOW_OPENGL {or SDL_WINDOW_RESIZABLE}; - if gFullscreen then wFlags := wFlags or SDL_WINDOW_FULLSCREEN else wFlags := wFlags or SDL_WINDOW_RESIZABLE; + if gFullscreen then wFlags := wFlags {or SDL_WINDOW_FULLSCREEN} else wFlags := wFlags or SDL_WINDOW_RESIZABLE; if (not gFullscreen) and (not preserveGL) and gWinMaximized then wFlags := wFlags or SDL_WINDOW_MAXIMIZED else gWinMaximized := false; if gFullscreen then @@ -144,6 +144,8 @@ begin begin KillGLWindow(preserveGL); h_Wnd := SDL_CreateWindow(PChar(wTitle), gWinRealPosX, gWinRealPosY, gScreenWidth, gScreenHeight, wFlags); + if gFullscreen then + SDL_SetWindowFullscreen(h_Wnd, SDL_WINDOW_FULLSCREEN); if (h_Wnd = nil) then exit; end; wasFullscreen := gFullscreen;