- removed the hard screen resolution switch that still was present on Windows and cleaned up the entire video backend code from the remaining support code for this.
Like Linux and macOS this will only support borderless fullscreen in the active desktop resolution now, which is what modern systems need. The list of discrete resolutions has been removed as it makes no sense anymore with a fixed video mode - all the other scaling options remain active, though.
This commit is contained in:
parent
322488d1d1
commit
b65b83edb3
28 changed files with 143 additions and 1826 deletions
|
|
@ -64,8 +64,8 @@ CUSTOM_CVAR(Int, vid_hwgamma, 2, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITC
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
OpenGLFrameBuffer::OpenGLFrameBuffer(void *hMonitor, int width, int height, int bits, int refreshHz, bool fullscreen) :
|
||||
Super(hMonitor, width, height, bits, refreshHz, fullscreen, false)
|
||||
OpenGLFrameBuffer::OpenGLFrameBuffer(void *hMonitor, bool fullscreen) :
|
||||
Super(hMonitor, fullscreen)
|
||||
{
|
||||
// SetVSync needs to be at the very top to workaround a bug in Nvidia's OpenGL driver.
|
||||
// If wglSwapIntervalEXT is called after glBindFramebuffer in a frame the setting is not changed!
|
||||
|
|
@ -161,16 +161,15 @@ void OpenGLFrameBuffer::Update()
|
|||
Swap();
|
||||
CheckBench();
|
||||
|
||||
int initialWidth = IsFullscreen() ? VideoWidth : GetClientWidth();
|
||||
int initialHeight = IsFullscreen() ? VideoHeight : GetClientHeight();
|
||||
int initialWidth = GetClientWidth();
|
||||
int initialHeight = GetClientHeight();
|
||||
int clientWidth = ViewportScaledWidth(initialWidth, initialHeight);
|
||||
int clientHeight = ViewportScaledHeight(initialWidth, initialHeight);
|
||||
if (clientWidth > 0 && clientHeight > 0 && (Width != clientWidth || Height != clientHeight))
|
||||
if (clientWidth > 0 && clientHeight > 0 && (GetWidth() != clientWidth || GetHeight() != clientHeight))
|
||||
{
|
||||
Width = clientWidth;
|
||||
Height = clientHeight;
|
||||
V_OutputResized(Width, Height);
|
||||
GLRenderer->mVBO->OutputResized(Width, Height);
|
||||
SetVirtualSize(clientWidth, clientHeight);
|
||||
V_OutputResized(clientWidth, clientHeight);
|
||||
GLRenderer->mVBO->OutputResized(clientWidth, clientHeight);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue