video: revert vscale_mode=4 and add vscale_mode=6.
This commit is contained in:
@@ -10,8 +10,9 @@ vscale_mode=0 ; 0 - scale to fit the screen height.
|
||||
; 1 - use integer scale only.
|
||||
; 2 - use 0.5 steps of scale.
|
||||
; 3 - use 0.25 steps of scale.
|
||||
; 4 - integer resolution scaling, both axes
|
||||
; 5 - integer resolution scaling, vertical only
|
||||
; 4 - integer resolution scaling, vertical only (option 1)
|
||||
; 5 - integer resolution scaling, vertical only (option 2)
|
||||
; 6 - integer resolution scaling, both axes
|
||||
vscale_border=0 ; set vertical border for TVs cutting the upper/bottom parts of screen (1-399)
|
||||
;bootscreen=0 ; uncomment to disable boot screen of some cores like Minimig.
|
||||
;mouse_throttle=10 ; 1-100 mouse speed divider. Useful for very sensitive mice
|
||||
|
||||
2
cfg.cpp
2
cfg.cpp
@@ -50,7 +50,7 @@ static const ini_var_t ini_vars[] =
|
||||
{ "KBD_NOMOUSE", (void*)(&(cfg.kbd_nomouse)), UINT8, 0, 1 },
|
||||
{ "MOUSE_THROTTLE", (void*)(&(cfg.mouse_throttle)), UINT8, 1, 100 },
|
||||
{ "BOOTSCREEN", (void*)(&(cfg.bootscreen)), UINT8, 0, 1 },
|
||||
{ "VSCALE_MODE", (void*)(&(cfg.vscale_mode)), UINT8, 0, 5 },
|
||||
{ "VSCALE_MODE", (void*)(&(cfg.vscale_mode)), UINT8, 0, 6 },
|
||||
{ "VSCALE_BORDER", (void*)(&(cfg.vscale_border)), UINT16, 0, 399 },
|
||||
{ "RBF_HIDE_DATECODE", (void*)(&(cfg.rbf_hide_datecode)), UINT8, 0, 1 },
|
||||
{ "MENU_PAL", (void*)(&(cfg.menu_pal)), UINT8, 0, 1 },
|
||||
|
||||
23
video.cpp
23
video.cpp
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user