Test screenshots through ViewportCapture: sRGB instead of the dark linear HDR frame

This commit is contained in:
cthangover committed 2026-10-23 09:03:55 +02:00
1 parent ce62db9553
commit 9bf0ec9de6
1 file changed
+2 -1
@@ -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");
}