Fix Windows size minimum not working correctly

This commit is contained in:
elasota
2021-02-20 15:16:47 -05:00
parent 3090f70ee6
commit 35b8e922d7

View File

@@ -1202,6 +1202,12 @@ void GpDisplayDriverD3D11::Run()
float pixelScaleX = 1.0f; float pixelScaleX = 1.0f;
float pixelScaleY = 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)) 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); bool resizedOK = ResizeD3DWindow(m_osGlobals->m_hwnd, m_windowWidthPhysical, m_windowHeightPhysical, desiredWidth, desiredHeight, windowStyle, menus, logger);