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

This commit is contained in:
cthangover committed 2026-10-23 09:03:57 +02:00
1 parent 89ee23f1e6
commit 7b7a5720e8
1 file changed
+2 -1
+2 -1
View File
@@ -10,6 +10,7 @@ using Cthangover.Core.UI.Inventory;
using Cthangover.Core.Utils;
using Cthangover.Mods.Items;
using Cthangover.Mods.Rpg;
using Cthangover.Mods.Interface.View;
using Godot;
namespace Cthangover.Mods.Trading.Tests
@@ -341,7 +342,7 @@ namespace Cthangover.Mods.Trading.Tests
if (string.IsNullOrEmpty(shotsDir) || DisplayServer.GetName() == "headless")
return;
DirAccess.MakeDirRecursiveAbsolute(shotsDir);
GetViewport().GetTexture().GetImage()?.SavePng(shotsDir.TrimEnd('/') + "/trade_" + name + ".png");
ViewportCapture.SavePng(GetViewport(), shotsDir.TrimEnd('/') + "/trade_" + name + ".png");
}
private void Finish()