Revert "video: allow setting linear filtering via config file"

Due to a misunderstanding of the rendering buffers, the prior commit
was a little pointless.  To achieve the same effect, instead use
`max_scaling_buffer_pixels 64000` in the extra cfg.

This reverts commit f48bc14086.
This commit is contained in:
Mike Swanson 2018-04-01 00:41:03 -07:00
parent f48bc14086
commit 8d3e982584
4 changed files with 4 additions and 31 deletions

View file

@ -104,10 +104,6 @@ char *video_driver = "";
char *window_position = "center";
// Scaling filter applied
char *scaling_filter = "nearest";
// SDL display number on which to run.
int video_display = 0;
@ -1294,20 +1290,11 @@ static void SetVideoMode(void)
SDL_DestroyTexture(texture);
}
// Set the scaling quality for rendering and immediate texture.
// Defaults to "nearest", which is gritty and pixelated and resembles
// software scaling pretty well. "linear" can be set as an alternative,
// which may give better results at low resolutions.
// Set the scaling quality for rendering the intermediate texture into
// the upscaled texture to "nearest", which is gritty and pixelated and
// resembles software scaling pretty well.
if (!strcmp(scaling_filter, "linear"))
{
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear");
}
else
{
scaling_filter = "nearest";
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "nearest");
}
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "nearest");
// Create the intermediate texture that the RGBA surface gets loaded into.
// The SDL_TEXTUREACCESS_STREAMING flag means that this texture's content
@ -1469,7 +1456,6 @@ void I_BindVideoVariables(void)
M_BindIntVariable("grabmouse", &grabmouse);
M_BindStringVariable("video_driver", &video_driver);
M_BindStringVariable("window_position", &window_position);
M_BindStringVariable("scaling_filter", &scaling_filter);
M_BindIntVariable("usegamma", &usegamma);
M_BindIntVariable("png_screenshots", &png_screenshots);
}

View file

@ -86,7 +86,6 @@ extern boolean screensaver_mode;
extern int usegamma;
extern pixel_t *I_VideoBuffer;
extern char *scaling_filter;
extern int screen_width;
extern int screen_height;
extern int fullscreen;

View file

@ -705,16 +705,6 @@ static default_t extra_defaults_list[] =
CONFIG_VARIABLE_STRING(window_position),
//!
//
// Scaling filter to use, accepted values are "nearest" (default)
// and "linear" - nearest gives a crisper display, but linear
// might produce more pleasing results at low resolutions
// (sub-640x480).
//
CONFIG_VARIABLE_STRING(scaling_filter),
//!
// If non-zero, the game will run in full screen mode. If zero,
// the game will run in a window.

View file

@ -65,7 +65,6 @@ static window_size_t window_sizes_scaled[] =
static char *video_driver = "";
static char *window_position = "";
static char *scaling_filter = "nearest";
static int aspect_ratio_correct = 1;
static int integer_scaling = 0;
static int vga_porch_flash = 0;
@ -262,7 +261,6 @@ void BindDisplayVariables(void)
M_BindIntVariable("startup_delay", &startup_delay);
M_BindStringVariable("video_driver", &video_driver);
M_BindStringVariable("window_position", &window_position);
M_BindStringVariable("scaling_filter", &scaling_filter);
M_BindIntVariable("usegamma", &usegamma);
M_BindIntVariable("png_screenshots", &png_screenshots);
M_BindIntVariable("vga_porch_flash", &vga_porch_flash);