mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 23:32:02 +00:00
Remove black bars from windowed mode
This commit is contained in:
parent
7bdbaaff22
commit
b378b3d05a
1 changed files with 13 additions and 2 deletions
|
@ -192,12 +192,23 @@ void OpenGLFrameBuffer::Update()
|
||||||
DrawRateStuff();
|
DrawRateStuff();
|
||||||
GLRenderer->Flush();
|
GLRenderer->Flush();
|
||||||
|
|
||||||
GLRenderer->SetOutputViewport(nullptr);
|
|
||||||
|
|
||||||
Swap();
|
Swap();
|
||||||
swapped = false;
|
swapped = false;
|
||||||
Unlock();
|
Unlock();
|
||||||
CheckBench();
|
CheckBench();
|
||||||
|
|
||||||
|
if (Windowed)
|
||||||
|
{
|
||||||
|
int clientWidth = GetClientWidth();
|
||||||
|
int clientHeight = GetClientHeight();
|
||||||
|
if (clientWidth > 0 && clientHeight > 0 && (Width != clientWidth || Height != clientHeight))
|
||||||
|
{
|
||||||
|
Resize(clientWidth, clientHeight);
|
||||||
|
V_OutputResized(Width, Height);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
GLRenderer->SetOutputViewport(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue