- Block the scale factor for low detail mode.

This commit is contained in:
drfrag 2019-09-25 12:33:24 +02:00
parent 6a3b50c561
commit c12d5795d2

View file

@ -128,6 +128,8 @@ int ViewportScaledWidth(int width, int height)
}
if (isOutOfBounds(vid_scalemode))
vid_scalemode = 0;
if (vid_scalemode == 6)
vid_scalefactor = 1.0;
if (vid_cropaspect && height > 0)
width = ((float)width/height > ActiveRatio(width, height)) ? (int)(height * ActiveRatio(width, height)) : width;
return (int)MAX((int32_t)160, (int32_t)(vid_scalefactor * vScaleTable[vid_scalemode].GetScaledWidth(width)));
@ -142,6 +144,8 @@ int ViewportScaledHeight(int width, int height)
}
if (isOutOfBounds(vid_scalemode))
vid_scalemode = 0;
if (vid_scalemode == 6)
vid_scalefactor = 1.0;
if (vid_cropaspect && height > 0)
height = ((float)width/height < ActiveRatio(width, height)) ? (int)(width / ActiveRatio(width, height)) : height;
return (int)MAX((int32_t)100, (int32_t)(vid_scalefactor * vScaleTable[vid_scalemode].GetScaledHeight(height)));