From 35b8e922d71bd235d38f1fe36241b49866b9e65e Mon Sep 17 00:00:00 2001 From: elasota Date: Sat, 20 Feb 2021 15:16:47 -0500 Subject: [PATCH] Fix Windows size minimum not working correctly --- GpDisplayDriver_D3D11/GpDisplayDriverD3D11.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/GpDisplayDriver_D3D11/GpDisplayDriverD3D11.cpp b/GpDisplayDriver_D3D11/GpDisplayDriverD3D11.cpp index 39f805a..875ea56 100644 --- a/GpDisplayDriver_D3D11/GpDisplayDriverD3D11.cpp +++ b/GpDisplayDriver_D3D11/GpDisplayDriverD3D11.cpp @@ -1202,6 +1202,12 @@ void GpDisplayDriverD3D11::Run() float pixelScaleX = 1.0f; float pixelScaleY = 1.0f; + if (desiredWidth < 640) + desiredWidth = 640; + + if (desiredHeight < 480) + desiredHeight = 480; + if (m_properties.m_adjustRequestedResolutionFunc(m_properties.m_adjustRequestedResolutionFuncContext, desiredWidth, desiredHeight, virtualWidth, virtualHeight, pixelScaleX, pixelScaleY)) { bool resizedOK = ResizeD3DWindow(m_osGlobals->m_hwnd, m_windowWidthPhysical, m_windowHeightPhysical, desiredWidth, desiredHeight, windowStyle, menus, logger);