fixed incorrect swap chain size messing up r_mode 1

This commit is contained in:
myT 2023-07-01 05:11:08 +02:00
parent 2789da3a48
commit fadbea4b2c

View file

@ -2299,8 +2299,8 @@ namespace RHI
const bool vsync = r_swapInterval->integer != 0;
rhi.renderFrameCount = vsync ? 1 : 2;
if(glConfig.vidWidth != desc.BufferDesc.Width ||
glConfig.vidHeight != desc.BufferDesc.Height ||
if(glInfo.winWidth != desc.BufferDesc.Width ||
glInfo.winHeight != desc.BufferDesc.Height ||
vsync != rhi.vsync)
{
WaitUntilDeviceIsIdle();
@ -2313,7 +2313,7 @@ namespace RHI
const UINT flags = GetSwapChainFlags();
if(vsync == rhi.vsync)
{
D3D(rhi.swapChain->ResizeBuffers(desc.BufferCount, glConfig.vidWidth, glConfig.vidHeight, desc.BufferDesc.Format, flags));
D3D(rhi.swapChain->ResizeBuffers(desc.BufferCount, glInfo.winWidth, glInfo.winHeight, desc.BufferDesc.Format, flags));
}
else
{