steamcompmgr: Add FILL upscaler
This commit is contained in:
parent
9b86a797a8
commit
f302a23069
2 changed files with 11 additions and 2 deletions
|
@ -33,6 +33,7 @@ enum class GamescopeUpscaleScaler : uint32_t
|
|||
AUTO,
|
||||
INTEGER,
|
||||
FIT,
|
||||
FILL,
|
||||
};
|
||||
|
||||
extern GamescopeUpscaleFilter g_upscaleFilter;
|
||||
|
|
|
@ -901,8 +901,16 @@ void calc_scale_factor(float &out_scale_x, float &out_scale_y, float sourceWidth
|
|||
float XRatio = (float)g_nNestedWidth / sourceWidth;
|
||||
float YRatio = (float)g_nNestedHeight / sourceHeight;
|
||||
|
||||
out_scale_x = std::min(XRatio, YRatio);
|
||||
out_scale_y = std::min(XRatio, YRatio);
|
||||
if (g_upscaleScaler != GamescopeUpscaleScaler::FILL)
|
||||
{
|
||||
out_scale_x = std::min(XRatio, YRatio);
|
||||
out_scale_y = std::min(XRatio, YRatio);
|
||||
}
|
||||
else
|
||||
{
|
||||
out_scale_x = std::max(XRatio, YRatio);
|
||||
out_scale_y = std::max(XRatio, YRatio);
|
||||
}
|
||||
|
||||
if (g_upscaleScaler == GamescopeUpscaleScaler::AUTO)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue