diff --git a/src/config.c b/src/config.c index 8e23cb3a8..208673c0d 100644 --- a/src/config.c +++ b/src/config.c @@ -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 diff --git a/src/include/86box/86box.h b/src/include/86box/86box.h index d4ca61b88..595bfa0e5 100644 --- a/src/include/86box/86box.h +++ b/src/include/86box/86box.h @@ -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 */ diff --git a/src/pc.c b/src/pc.c index 488085301..db15ee617 100644 --- a/src/pc.c +++ b/src/pc.c @@ -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 */