[client] win: add new option win:shrinkOnUpscale

This option constrains the client's window dimensions to the guest's resolution when 'dontUpscale' is also enabled
This commit is contained in:
A.J. Ruckman
2021-03-28 15:28:56 -04:00
committed by Geoffrey McRae
parent 60feb3050c
commit dec4c8533c
4 changed files with 24 additions and 0 deletions

View File

@@ -238,6 +238,20 @@ void core_updatePositionInfo(void)
g_state.dstRect.y = (g_state.windowH >> 1) - (g_state.dstRect.h >> 1);
}
if (g_params.dontUpscale && g_params.shrinkOnUpscale)
{
if (g_state.windowW > srcW)
{
force = true;
g_state.dstRect.w = srcW;
}
if (g_state.windowH > srcH)
{
force = true;
g_state.dstRect.h = srcH;
}
}
if (force && g_params.forceAspect)
{
g_state.resizeTimeout = microtime() + RESIZE_TIMEOUT;