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

This commit is contained in:
cthangover committed 2026-10-23 09:03:56 +02:00
1 parent 10214416ad
commit 281b722667
1 file changed
+2 -1
+2 -1
View File
@@ -7,6 +7,7 @@ using Cthangover.Core.Games;
using Cthangover.Core.Scenes;
using Cthangover.Core.Settings;
using Cthangover.Core.Utils;
using Cthangover.Mods.Interface.View;
using Godot;
namespace Cthangover.Mods.Rpg.Tests
@@ -287,7 +288,7 @@ namespace Cthangover.Mods.Rpg.Tests
if (string.IsNullOrEmpty(shotsDir) || DisplayServer.GetName() == "headless")
return;
DirAccess.MakeDirRecursiveAbsolute(shotsDir);
GetViewport().GetTexture().GetImage()?.SavePng(shotsDir.TrimEnd('/') + "/rpg_" + name + ".png");
ViewportCapture.SavePng(GetViewport(), shotsDir.TrimEnd('/') + "/rpg_" + name + ".png");
}
private void Finish()