feat: show used video memory in dev bar

This commit is contained in:
goat 2023-01-02 13:23:36 +01:00
parent 41d41036d7
commit 0dc58cce56
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B
2 changed files with 25 additions and 3 deletions

View file

@ -849,7 +849,12 @@ internal class DalamudInterface : IDisposable, IServiceType
ImGui.BeginMenu(Util.GetGitHash(), false);
ImGui.BeginMenu(this.FrameCount.ToString("000000"), false);
ImGui.BeginMenu(ImGui.GetIO().Framerate.ToString("000"), false);
ImGui.BeginMenu($"{Util.FormatBytes(GC.GetTotalMemory(false))}", false);
ImGui.BeginMenu($"W:{Util.FormatBytes(GC.GetTotalMemory(false))}", false);
var videoMem = Service<InterfaceManager>.Get().GetD3dMemoryInfo();
ImGui.BeginMenu(
!videoMem.HasValue ? $"V:???" : $"V:{Util.FormatBytes(videoMem.Value.Used)}",
false);
ImGui.PopFont();
}