]> gitweb.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
video: log Unix shader scaler mode
authorStefan Reinauer <stefan.reinauer@coreboot.org>
Sun, 21 Jun 2026 18:44:19 +0000 (11:44 -0700)
committerStefan Reinauer <stefan.reinauer@coreboot.org>
Tue, 7 Jul 2026 21:00:11 +0000 (14:00 -0700)
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
od-unix/video_sdl.cpp

index c2e9a56e3b18b9e7c1b6726e6f82844349757b2b..9618298bc7528a484994a68df446b9785a6288ea 100644 (file)
@@ -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;
index 10d59a22539f11f66fae23a055aa28bd91144cf0..13e88b9da5270f4b350627318edb188d26811e8f 100644 (file)
@@ -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);