Adds config settings for borderless fullscreen and window modes.
Tested By: bb, Langbart Differential Revision: https://code.wildfiregames.com/D4106 This was SVN commit r26148.
This commit is contained in:
parent
202e248c93
commit
7b8c66ec9f
@ -26,6 +26,11 @@
|
||||
; Enable/disable windowed mode by default. (Use Alt+Enter to toggle in the game.)
|
||||
windowed = false
|
||||
|
||||
; Switches between real fullscreen and borderless window on a full display size.
|
||||
borderless.fullscreen = true
|
||||
; Hides a window border in the windowed mode.
|
||||
borderless.window = false
|
||||
|
||||
; Show detailed tooltips (Unit stats)
|
||||
showdetailedtooltips = false
|
||||
|
||||
|
@ -244,7 +244,18 @@ bool CVideoMode::SetVideoMode(int w, int h, int bpp, bool fullscreen)
|
||||
{
|
||||
Uint32 flags = 0;
|
||||
if (fullscreen)
|
||||
flags |= SDL_WINDOW_FULLSCREEN_DESKTOP;
|
||||
{
|
||||
bool borderlessFullscreen = true;
|
||||
CFG_GET_VAL("borderless.fullscreen", borderlessFullscreen);
|
||||
flags |= borderlessFullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : SDL_WINDOW_FULLSCREEN;
|
||||
}
|
||||
else
|
||||
{
|
||||
bool borderlessWindow = false;
|
||||
CFG_GET_VAL("borderless.window", borderlessWindow);
|
||||
if (borderlessWindow)
|
||||
flags |= SDL_WINDOW_BORDERLESS;
|
||||
}
|
||||
|
||||
if (!m_Window)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user