From 58a16d607ec4c3f32e0663b982c6b70713d11f7c Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Sun, 21 Jun 2026 11:44:19 -0700 Subject: [PATCH] video: log Unix shader scaler mode Log parsed unix.gfx_shader values and report GL scaler mode changes. This makes scale2x nearest-filter decisions visible without logging every presented frame. --- od-unix/config.cpp | 1 + od-unix/video_sdl.cpp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/od-unix/config.cpp b/od-unix/config.cpp index c2e9a56e..9618298b 100644 --- a/od-unix/config.cpp +++ b/od-unix/config.cpp @@ -521,6 +521,7 @@ int target_parse_option(struct uae_prefs *p, const TCHAR *option, const TCHAR *v if (!_tcsicmp(option, _T("gfx_shader"))) { uae_tcslcpy(unix_gfx_shader, value && value[0] ? value : _T("none"), sizeof unix_gfx_shader / sizeof(TCHAR)); + write_log(_T("unix.gfx_shader = '%s'\n"), unix_gfx_shader); return 1; } return 0; diff --git a/od-unix/video_sdl.cpp b/od-unix/video_sdl.cpp index 10d59a22..13e88b9d 100644 --- a/od-unix/video_sdl.cpp +++ b/od-unix/video_sdl.cpp @@ -1384,6 +1384,12 @@ static void unix_gl_present(const struct unix_video_frame *frame, const struct g /* Scale2x samples discrete texels; it requires nearest filtering. */ const TCHAR *shader_name = unix_gfx_shader_option(); const int scaler = shader_name && !_tcsicmp(shader_name, _T("scale2x")) ? 1 : 0; + static int logged_scaler = -1; + if (scaler != logged_scaler) { + write_log(_T("GL presenter: scaler mode %d (gfx_shader '%s')\n"), + scaler, shader_name ? shader_name : _T("")); + logged_scaler = scaler; + } const bool bilinear = !scaler && filter && filter->gfx_filter_bilinear; glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, bilinear ? GL_LINEAR : GL_NEAREST); -- 2.47.3