commit 8d3e982584c8ea904fe7c12044c147a19494310d
Author: Mike Swanson <mikeonthecomputer@gmail.com>
AuthorDate: Sun Apr 1 00:41:03 2018 -0700
Commit: Mike Swanson <mikeonthecomputer@gmail.com>
CommitDate: Sun Apr 1 00:41:03 2018 -0700
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 f48bc14086eeeacc5f3bab4361d7302f019baca5.
---
src/i_video.c | 22 ++++------------------
src/i_video.h | 1 -
src/m_config.c | 10 ----------
src/setup/display.c | 2 --
4 files changed, 4 insertions(+), 31 deletions(-)
diff --git a/src/i_video.c b/src/i_video.c
index fbe3ffd2..c44a8a6c 100644
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -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);
}
diff --git a/src/i_video.h b/src/i_video.h
index 5f64ebc3..6e5c2e05 100644
--- a/src/i_video.h
+++ b/src/i_video.h
@@ -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;
diff --git a/src/m_config.c b/src/m_config.c
index 0b5d50e0..019c48c7 100644
--- a/src/m_config.c
+++ b/src/m_config.c
@@ -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.
diff --git a/src/setup/display.c b/src/setup/display.c
index f7b9a662..b99d9fd3 100644
--- a/src/setup/display.c
+++ b/src/setup/display.c
@@ -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);