mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-21 06:48:13 +00:00
[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:

committed by
Geoffrey McRae

parent
60feb3050c
commit
dec4c8533c
@@ -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;
|
||||
|
Reference in New Issue
Block a user