video: revert vscale_mode=4 and add vscale_mode=6.

This commit is contained in:
Sorgelig
2022-05-23 03:18:49 +08:00
parent 1d2c72dfc4
commit 18785a56d8
3 changed files with 21 additions and 9 deletions

View File

@@ -1614,15 +1614,26 @@ static void video_resolution_adjust(const VideoInfo *vi, vmode_custom_t *vm)
if (w == 0 || h == 0 || core_height == 0) return;
int scale = h / core_height;
if (scale == 0) return;
int scale_h = h / core_height;
int scale_w = w / core_width;
if (!scale_h) return;
int disp_h = core_height * scale;
int disp_w = w;
int disp_h, disp_w;
if (cfg.vscale_mode == 4)
{
scale = w / core_width;
if (scale == 0) return;
disp_h = core_height * scale_h;
disp_w = (disp_h * w) / h;
}
else if(cfg.vscale_mode == 5)
{
disp_h = core_height * scale_h;
disp_w = w;
}
else
{
if (!scale_w) return;
int scale = (scale_h < scale_w) ? scale_h : scale_w;
disp_h = core_height * scale;
disp_w = core_width * scale;
}