remove interger scaling

This commit is contained in:
Roman Fomin 2023-12-16 16:50:22 +07:00
parent 834c10510c
commit 8efdd489ce
3 changed files with 2 additions and 28 deletions

View File

@ -57,7 +57,6 @@ int fpslimit; // when uncapped, limit framerate to this value
boolean fullscreen; boolean fullscreen;
boolean exclusive_fullscreen; boolean exclusive_fullscreen;
int widescreen; // widescreen mode int widescreen; // widescreen mode
boolean integer_scaling; // [FG] force integer scales
boolean vga_porch_flash; // emulate VGA "porch" behaviour boolean vga_porch_flash; // emulate VGA "porch" behaviour
boolean smooth_scaling; boolean smooth_scaling;
@ -271,7 +270,7 @@ static boolean ToggleFullScreenKeyShortcut(SDL_Keysym *sym)
static void AdjustWindowSize(void) static void AdjustWindowSize(void)
{ {
if (!use_aspect && !integer_scaling) if (!use_aspect)
{ {
return; return;
} }
@ -844,20 +843,7 @@ boolean I_WritePNGfile(char *filename)
// [FG] adjust cropping rectangle if necessary // [FG] adjust cropping rectangle if necessary
SDL_GetRendererOutputSize(renderer, &rect.w, &rect.h); SDL_GetRendererOutputSize(renderer, &rect.w, &rect.h);
if (integer_scaling) if (rect.w * actualheight > rect.h * video.width)
{
int temp1, temp2, scale;
temp1 = rect.w;
temp2 = rect.h;
scale = MIN(rect.w / video.width, rect.h / actualheight);
rect.w = video.width * scale;
rect.h = actualheight * scale;
rect.x = (temp1 - rect.w) / 2;
rect.y = (temp2 - rect.h) / 2;
}
else if (rect.w * actualheight > rect.h * video.width)
{ {
int temp = rect.w; int temp = rect.w;
rect.w = rect.h * video.width / actualheight; rect.w = rect.h * video.width / actualheight;
@ -1352,9 +1338,6 @@ static void I_InitGraphicsMode(void)
I_Error("Error creating renderer for screen window: %s", I_Error("Error creating renderer for screen window: %s",
SDL_GetError()); SDL_GetError());
} }
// [FG] force integer scales
SDL_RenderSetIntegerScale(renderer, integer_scaling ? SDL_TRUE : SDL_FALSE);
} }
static int CurrentResolutionMode(void) static int CurrentResolutionMode(void)

View File

@ -75,7 +75,6 @@ extern boolean fullscreen;
extern boolean exclusive_fullscreen; extern boolean exclusive_fullscreen;
extern int fpslimit; // when uncapped, limit framerate to this value extern int fpslimit; // when uncapped, limit framerate to this value
extern int fps; extern int fps;
extern boolean integer_scaling; // [FG] force integer scales
extern boolean vga_porch_flash; // emulate VGA "porch" behaviour extern boolean vga_porch_flash; // emulate VGA "porch" behaviour
extern int widescreen; // widescreen mode extern int widescreen; // widescreen mode
extern int video_display; // display index extern int video_display; // display index

View File

@ -183,14 +183,6 @@ default_t defaults[] = {
"framerate limit in frames per second (< 35 = disable)" "framerate limit in frames per second (< 35 = disable)"
}, },
// [FG] force integer scales
{
"integer_scaling",
(config_t *) &integer_scaling, NULL,
{0}, {0, 1}, number, ss_none, wad_no,
"1 to force integer scales"
},
// widescreen mode // widescreen mode
{ {
"widescreen", "widescreen",