Add config for DPI scaling of the emulated screen

This commit is contained in:
driver1998
2020-09-02 10:56:49 +08:00
parent eca3d62be8
commit ef1b1557c9
3 changed files with 9 additions and 1 deletions

View File

@@ -459,7 +459,8 @@ load_general(void)
force_43 = !!config_get_int(cat, "force_43", 0);
scale = config_get_int(cat, "scale", 1);
if (scale > 3)
scale = 3;
scale = 3;
dpi_scale = config_get_int(cat, "dpi_scale", 1);
enable_overscan = !!config_get_int(cat, "enable_overscan", 0);
vid_cga_contrast = !!config_get_int(cat, "vid_cga_contrast", 0);
@@ -1605,6 +1606,11 @@ save_general(void)
else
config_set_int(cat, "scale", scale);
if (dpi_scale == 1)
config_delete_var(cat, "dpi_scale");
else
config_set_int(cat, "dpi_scale", dpi_scale);
if (enable_overscan == 0)
config_delete_var(cat, "enable_overscan");
else

View File

@@ -82,6 +82,7 @@ extern int window_w, window_h, /* (C) window size and */
invert_display, /* (C) invert the display */
suppress_overscan; /* (C) suppress overscans */
extern int scale; /* (C) screen scale factor */
extern int dpi_scale; /* (C) DPI scaling of the emulated screen */
extern int vid_api; /* (C) video renderer */
extern int vid_cga_contrast, /* (C) video */
video_fullscreen, /* (C) video */

View File

@@ -116,6 +116,7 @@ int window_w, window_h, /* (C) window size and */
invert_display = 0, /* (C) invert the display */
suppress_overscan = 0; /* (C) suppress overscans */
int scale = 0; /* (C) screen scale factor */
int dpi_scale = 0; /* (C) DPI scaling of the emulated screen */
int vid_api = 0; /* (C) video renderer */
int vid_cga_contrast = 0, /* (C) video */
video_fullscreen = 0, /* (C) video */