mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 23:11:58 +00:00
- implemented win_borderless for fake fullscreen in Windows
This commit is contained in:
parent
a29d9e157c
commit
938cd3cabe
1 changed files with 20 additions and 0 deletions
|
@ -53,6 +53,7 @@ EXTERN_CVAR (Bool, fullscreen)
|
||||||
EXTERN_CVAR (Bool, swtruecolor)
|
EXTERN_CVAR (Bool, swtruecolor)
|
||||||
EXTERN_CVAR (Float, vid_winscale)
|
EXTERN_CVAR (Float, vid_winscale)
|
||||||
EXTERN_CVAR (Bool, vid_forceddraw)
|
EXTERN_CVAR (Bool, vid_forceddraw)
|
||||||
|
EXTERN_CVAR (Bool, win_borderless)
|
||||||
|
|
||||||
CVAR(Int, win_x, -1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
CVAR(Int, win_x, -1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
CVAR(Int, win_y, -1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
CVAR(Int, win_y, -1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
|
@ -413,6 +414,13 @@ void I_RestoreWindowedPos ()
|
||||||
}
|
}
|
||||||
MoveWindow (Window, winx, winy, winw, winh, TRUE);
|
MoveWindow (Window, winx, winy, winw, winh, TRUE);
|
||||||
|
|
||||||
|
if (win_borderless && !Args->CheckParm("-0"))
|
||||||
|
{
|
||||||
|
LONG lStyle = GetWindowLong(Window, GWL_STYLE);
|
||||||
|
lStyle &= ~(WS_CAPTION | WS_THICKFRAME | WS_MINIMIZE | WS_MAXIMIZE | WS_SYSMENU);
|
||||||
|
SetWindowLong(Window, GWL_STYLE, lStyle);
|
||||||
|
SetWindowPos(Window, HWND_TOP, 0, 0, scrwidth, scrheight, 0);
|
||||||
|
}
|
||||||
if (win_maximized && !Args->CheckParm("-0"))
|
if (win_maximized && !Args->CheckParm("-0"))
|
||||||
ShowWindow(Window, SW_MAXIMIZE);
|
ShowWindow(Window, SW_MAXIMIZE);
|
||||||
}
|
}
|
||||||
|
@ -432,6 +440,18 @@ CUSTOM_CVAR(Bool, swtruecolor, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CUSTOM_CVAR(Bool, win_borderless, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
||||||
|
{
|
||||||
|
// Just reinit the window. Saves a lot of trouble.
|
||||||
|
if (!fullscreen)
|
||||||
|
{
|
||||||
|
NewWidth = screen->VideoWidth;
|
||||||
|
NewHeight = screen->VideoHeight;
|
||||||
|
NewBits = DisplayBits;
|
||||||
|
setmodeneeded = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
CUSTOM_CVAR (Bool, fullscreen, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITCALL)
|
CUSTOM_CVAR (Bool, fullscreen, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITCALL)
|
||||||
{
|
{
|
||||||
NewWidth = screen->VideoWidth;
|
NewWidth = screen->VideoWidth;
|
||||||
|
|
Loading…
Reference in a new issue