From 9bf0ec9de6f3237283913fdc7e666992082a4392 Mon Sep 17 00:00:00 2001 From: iisaev Date: Fri, 23 Oct 2026 09:03:55 +0200 Subject: [PATCH] Test screenshots through ViewportCapture: sRGB instead of the dark linear HDR frame --- test_suites/site_shots/src/SiteShotsDriver.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test_suites/site_shots/src/SiteShotsDriver.cs b/test_suites/site_shots/src/SiteShotsDriver.cs index a67a721..f7895a4 100644 --- a/test_suites/site_shots/src/SiteShotsDriver.cs +++ b/test_suites/site_shots/src/SiteShotsDriver.cs @@ -6,6 +6,7 @@ using Cthangover.Core.Settings; using Cthangover.Core.UI; using Cthangover.Core.Utils; using Cthangover.Mods.Dialog; +using Cthangover.Mods.Interface.View; using Godot; namespace Cthangover.Mods.CthangoverGame.Tests @@ -257,7 +258,7 @@ namespace Cthangover.Mods.CthangoverGame.Tests if (string.IsNullOrEmpty(shotsDir) || DisplayServer.GetName() == "headless") return; DirAccess.MakeDirRecursiveAbsolute(shotsDir); - GetViewport().GetTexture().GetImage()?.SavePng(shotsDir.TrimEnd('/') + "/" + name + ".png"); + ViewportCapture.SavePng(GetViewport(), shotsDir.TrimEnd('/') + "/" + name + ".png"); GameLogger.Log("TEST", $"SiteShotsDriver: saved {name}.png"); }