steamcompmgr: Add regular FIT as an option

This commit is contained in:
Joshua Ashton 2022-10-28 02:02:06 +01:00
parent 4a4178075e
commit c9c0044250
2 changed files with 5 additions and 2 deletions

View file

@ -32,6 +32,7 @@ enum class GamescopeUpscaleScaler : uint32_t
{
SMART_FIT,
INTEGER,
FIT,
};
extern GamescopeUpscaleFilter g_upscaleFilter;

View file

@ -1301,7 +1301,8 @@ void MouseCursor::paint(win *window, win *fit, struct FrameInfo_t *frameInfo)
int cursorOffsetX, cursorOffsetY;
currentScaleRatio = (XRatio < YRatio) ? XRatio : YRatio;
currentScaleRatio = std::min(g_flMaxWindowScale, currentScaleRatio);
if (g_upscaleScaler == GamescopeUpscaleScaler::SMART_FIT)
currentScaleRatio = std::min(g_flMaxWindowScale, currentScaleRatio);
currentScaleRatio *= outputScaleRatio;
if (g_upscaleScaler == GamescopeUpscaleScaler::INTEGER)
{
@ -1492,7 +1493,8 @@ paint_window(win *w, win *scaleW, struct FrameInfo_t *frameInfo,
float YRatio = (float)g_nNestedHeight / sourceHeight;
currentScaleRatio = (XRatio < YRatio) ? XRatio : YRatio;
currentScaleRatio = std::min(g_flMaxWindowScale, currentScaleRatio);
if (g_upscaleScaler == GamescopeUpscaleScaler::SMART_FIT)
currentScaleRatio = std::min(g_flMaxWindowScale, currentScaleRatio);
currentScaleRatio *= outputScaleRatio;
if (g_upscaleScaler == GamescopeUpscaleScaler::INTEGER)
{