mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +01:00
Merge branch 'master' into master
This commit is contained in:
commit
e5ef53b1c6
19 changed files with 118 additions and 60 deletions
3
.github/workflows/main.yml
vendored
3
.github/workflows/main.yml
vendored
|
|
@ -10,9 +10,10 @@ jobs:
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Dalamud
|
- name: Checkout Dalamud
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
fetch-depth: 0
|
||||||
- name: Setup MSBuild
|
- name: Setup MSBuild
|
||||||
uses: microsoft/setup-msbuild@v1.0.2
|
uses: microsoft/setup-msbuild@v1.0.2
|
||||||
- name: Define VERSION
|
- name: Define VERSION
|
||||||
|
|
|
||||||
|
|
@ -260,7 +260,6 @@ namespace Dalamud.Injector
|
||||||
|
|
||||||
for (var i = 2; i < args.Count; i++)
|
for (var i = 2; i < args.Count; i++)
|
||||||
{
|
{
|
||||||
Log.Information(args[i]);
|
|
||||||
if (args[i].StartsWith(key = "--dalamud-working-directory="))
|
if (args[i].StartsWith(key = "--dalamud-working-directory="))
|
||||||
workingDirectory = args[i][key.Length..];
|
workingDirectory = args[i][key.Length..];
|
||||||
else if (args[i].StartsWith(key = "--dalamud-configuration-path="))
|
else if (args[i].StartsWith(key = "--dalamud-configuration-path="))
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Label="Feature">
|
<PropertyGroup Label="Feature">
|
||||||
<DalamudVersion>7.4.1.0</DalamudVersion>
|
<DalamudVersion>7.4.3.0</DalamudVersion>
|
||||||
<Description>XIV Launcher addon framework</Description>
|
<Description>XIV Launcher addon framework</Description>
|
||||||
<AssemblyVersion>$(DalamudVersion)</AssemblyVersion>
|
<AssemblyVersion>$(DalamudVersion)</AssemblyVersion>
|
||||||
<Version>$(DalamudVersion)</Version>
|
<Version>$(DalamudVersion)</Version>
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ public sealed class DataManager : IDisposable, IServiceType
|
||||||
{
|
{
|
||||||
LoadMultithreaded = true,
|
LoadMultithreaded = true,
|
||||||
CacheFileResources = true,
|
CacheFileResources = true,
|
||||||
#if DEBUG
|
#if NEVER // Lumina bug
|
||||||
PanicOnSheetChecksumMismatch = true,
|
PanicOnSheetChecksumMismatch = true,
|
||||||
#else
|
#else
|
||||||
PanicOnSheetChecksumMismatch = false,
|
PanicOnSheetChecksumMismatch = false,
|
||||||
|
|
|
||||||
|
|
@ -177,7 +177,7 @@ public sealed class EntryPoint
|
||||||
InitSymbolHandler(info);
|
InitSymbolHandler(info);
|
||||||
|
|
||||||
var dalamud = new Dalamud(info, configuration, mainThreadContinueEvent);
|
var dalamud = new Dalamud(info, configuration, mainThreadContinueEvent);
|
||||||
Log.Information("This is Dalamud - Core: {GitHash}, CS: {CsGitHash}", Util.GetGitHash(), Util.GetGitHashClientStructs());
|
Log.Information("This is Dalamud - Core: {GitHash}, CS: {CsGitHash} [{CsVersion}]", Util.GetGitHash(), Util.GetGitHashClientStructs(), FFXIVClientStructs.Interop.Resolver.Version);
|
||||||
|
|
||||||
dalamud.WaitForUnload();
|
dalamud.WaitForUnload();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -79,4 +79,9 @@ public enum ObjectKind : byte
|
||||||
/// Objects representing card stand objects.
|
/// Objects representing card stand objects.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
CardStand = 0x0E,
|
CardStand = 0x0E,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Objects representing ornament (Fashion Accessories) objects.
|
||||||
|
/// </summary>
|
||||||
|
Ornament = 0x0F,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -111,8 +111,12 @@ public sealed partial class ObjectTable : IServiceType
|
||||||
{
|
{
|
||||||
ObjectKind.Player => new PlayerCharacter(address),
|
ObjectKind.Player => new PlayerCharacter(address),
|
||||||
ObjectKind.BattleNpc => new BattleNpc(address),
|
ObjectKind.BattleNpc => new BattleNpc(address),
|
||||||
|
ObjectKind.EventNpc => new Npc(address),
|
||||||
|
ObjectKind.Retainer => new Npc(address),
|
||||||
ObjectKind.EventObj => new EventObj(address),
|
ObjectKind.EventObj => new EventObj(address),
|
||||||
ObjectKind.Companion => new Npc(address),
|
ObjectKind.Companion => new Npc(address),
|
||||||
|
ObjectKind.MountType => new Npc(address),
|
||||||
|
ObjectKind.Ornament => new Npc(address),
|
||||||
_ => new GameObject(address),
|
_ => new GameObject(address),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -113,6 +113,11 @@ public unsafe partial class GameObject
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public uint OwnerId => this.Struct->OwnerID;
|
public uint OwnerId => this.Struct->OwnerID;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the index of this object in the object table.
|
||||||
|
/// </summary>
|
||||||
|
public ushort ObjectIndex => this.Struct->ObjectIndex;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the entity kind of this <see cref="GameObject" />.
|
/// Gets the entity kind of this <see cref="GameObject" />.
|
||||||
/// See <see cref="ObjectKind">the ObjectKind enum</see> for possible values.
|
/// See <see cref="ObjectKind">the ObjectKind enum</see> for possible values.
|
||||||
|
|
|
||||||
|
|
@ -184,8 +184,18 @@ public sealed unsafe class GameGui : IDisposable, IServiceType
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="worldPos">Coordinates in the world.</param>
|
/// <param name="worldPos">Coordinates in the world.</param>
|
||||||
/// <param name="screenPos">Converted coordinates.</param>
|
/// <param name="screenPos">Converted coordinates.</param>
|
||||||
/// <returns>True if worldPos corresponds to a position in front of the camera.</returns>
|
/// <returns>True if worldPos corresponds to a position in front of the camera and screenPos is in the viewport.</returns>
|
||||||
public bool WorldToScreen(Vector3 worldPos, out Vector2 screenPos)
|
public bool WorldToScreen(Vector3 worldPos, out Vector2 screenPos)
|
||||||
|
=> this.WorldToScreen(worldPos, out screenPos, out var inView) && inView;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Converts in-world coordinates to screen coordinates (upper left corner origin).
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="worldPos">Coordinates in the world.</param>
|
||||||
|
/// <param name="screenPos">Converted coordinates.</param>
|
||||||
|
/// <param name="inView">True if screenPos corresponds to a position inside the camera viewport.</param>
|
||||||
|
/// <returns>True if worldPos corresponds to a position in front of the camera.</returns>
|
||||||
|
public bool WorldToScreen(Vector3 worldPos, out Vector2 screenPos, out bool inView)
|
||||||
{
|
{
|
||||||
// Get base object with matrices
|
// Get base object with matrices
|
||||||
var matrixSingleton = this.getMatrixSingleton();
|
var matrixSingleton = this.getMatrixSingleton();
|
||||||
|
|
@ -203,9 +213,12 @@ public sealed unsafe class GameGui : IDisposable, IServiceType
|
||||||
screenPos.X = (0.5f * width * (screenPos.X + 1f)) + windowPos.X;
|
screenPos.X = (0.5f * width * (screenPos.X + 1f)) + windowPos.X;
|
||||||
screenPos.Y = (0.5f * height * (1f - screenPos.Y)) + windowPos.Y;
|
screenPos.Y = (0.5f * height * (1f - screenPos.Y)) + windowPos.Y;
|
||||||
|
|
||||||
return pCoords.Z > 0 &&
|
var inFront = pCoords.Z > 0;
|
||||||
screenPos.X > windowPos.X && screenPos.X < windowPos.X + width &&
|
inView = inFront &&
|
||||||
screenPos.Y > windowPos.Y && screenPos.Y < windowPos.Y + height;
|
screenPos.X > windowPos.X && screenPos.X < windowPos.X + width &&
|
||||||
|
screenPos.Y > windowPos.Y && screenPos.Y < windowPos.Y + height;
|
||||||
|
|
||||||
|
return inFront;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -395,26 +395,6 @@ public class SigScanner : IDisposable, IServiceType
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private unsafe class UnsafeCodeReader : CodeReader
|
|
||||||
{
|
|
||||||
private readonly int length;
|
|
||||||
private readonly byte* address;
|
|
||||||
private int pos;
|
|
||||||
public UnsafeCodeReader(byte* address, int length)
|
|
||||||
{
|
|
||||||
this.length = length;
|
|
||||||
this.address = address;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool CanReadByte => this.pos < this.length;
|
|
||||||
|
|
||||||
public override int ReadByte()
|
|
||||||
{
|
|
||||||
if (this.pos >= this.length) return -1;
|
|
||||||
return *(this.address + this.pos++);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Helper for ScanText to get the correct address for IDA sigs that mark the first JMP or CALL location.
|
/// Helper for ScanText to get the correct address for IDA sigs that mark the first JMP or CALL location.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -578,4 +558,25 @@ public class SigScanner : IDisposable, IServiceType
|
||||||
Log.Error(ex, "Couldn't load cached sigs");
|
Log.Error(ex, "Couldn't load cached sigs");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private unsafe class UnsafeCodeReader : CodeReader
|
||||||
|
{
|
||||||
|
private readonly int length;
|
||||||
|
private readonly byte* address;
|
||||||
|
private int pos;
|
||||||
|
|
||||||
|
public UnsafeCodeReader(byte* address, int length)
|
||||||
|
{
|
||||||
|
this.length = length;
|
||||||
|
this.address = address;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool CanReadByte => this.pos < this.length;
|
||||||
|
|
||||||
|
public override int ReadByte()
|
||||||
|
{
|
||||||
|
if (this.pos >= this.length) return -1;
|
||||||
|
return *(this.address + this.pos++);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -304,7 +304,7 @@ public class SeString
|
||||||
foreach (var place in matches)
|
foreach (var place in matches)
|
||||||
{
|
{
|
||||||
var map = mapSheet.FirstOrDefault(row => row.PlaceName.Row == place.RowId);
|
var map = mapSheet.FirstOrDefault(row => row.PlaceName.Row == place.RowId);
|
||||||
if (map != null)
|
if (map != null && map.TerritoryType.Row != 0)
|
||||||
{
|
{
|
||||||
return CreateMapLink(map.TerritoryType.Row, map.RowId, xCoord, yCoord, fudgeFactor);
|
return CreateMapLink(map.TerritoryType.Row, map.RowId, xCoord, yCoord, fudgeFactor);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ public class Hook<T> : IDisposable, IDalamudHook where T : Delegate
|
||||||
if (EnvironmentConfiguration.DalamudForceMinHook)
|
if (EnvironmentConfiguration.DalamudForceMinHook)
|
||||||
useMinHook = true;
|
useMinHook = true;
|
||||||
|
|
||||||
address = HookManager.FollowJmp(address);
|
this.address = address = HookManager.FollowJmp(address);
|
||||||
if (useMinHook)
|
if (useMinHook)
|
||||||
this.compatHookImpl = new MinHookHook<T>(address, detour, callingAssembly);
|
this.compatHookImpl = new MinHookHook<T>(address, detour, callingAssembly);
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -697,7 +697,7 @@ internal class DalamudInterface : IDisposable, IServiceType
|
||||||
|
|
||||||
ImGui.MenuItem(Util.AssemblyVersion, false);
|
ImGui.MenuItem(Util.AssemblyVersion, false);
|
||||||
ImGui.MenuItem(startInfo.GameVersion?.ToString() ?? "Unknown version", false);
|
ImGui.MenuItem(startInfo.GameVersion?.ToString() ?? "Unknown version", false);
|
||||||
ImGui.MenuItem($"D: {Util.GetGitHash()} CS: {Util.GetGitHashClientStructs()}", false);
|
ImGui.MenuItem($"D: {Util.GetGitHash()} CS: {Util.GetGitHashClientStructs()} [{FFXIVClientStructs.Interop.Resolver.Version}]", false);
|
||||||
ImGui.MenuItem($"CLR: {Environment.Version}", false);
|
ImGui.MenuItem($"CLR: {Environment.Version}", false);
|
||||||
|
|
||||||
ImGui.EndMenu();
|
ImGui.EndMenu();
|
||||||
|
|
|
||||||
|
|
@ -417,8 +417,8 @@ internal class InterfaceManager : IDisposable, IServiceType
|
||||||
if (this.Device == null)
|
if (this.Device == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
var dxgiDev = this.Device.QueryInterface<SharpDX.DXGI.Device>();
|
var dxgiDev = this.Device.QueryInterfaceOrNull<SharpDX.DXGI.Device>();
|
||||||
var dxgiAdapter = dxgiDev.Adapter.QueryInterfaceOrNull<SharpDX.DXGI.Adapter4>();
|
var dxgiAdapter = dxgiDev?.Adapter.QueryInterfaceOrNull<SharpDX.DXGI.Adapter4>();
|
||||||
if (dxgiAdapter == null)
|
if (dxgiAdapter == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,8 @@ internal class PluginInstallerWindow : Window, IDisposable
|
||||||
|
|
||||||
private readonly DateTime timeLoaded;
|
private readonly DateTime timeLoaded;
|
||||||
|
|
||||||
|
private readonly object listLock = new();
|
||||||
|
|
||||||
#region Image Tester State
|
#region Image Tester State
|
||||||
|
|
||||||
private string[] testerImagePaths = new string[5];
|
private string[] testerImagePaths = new string[5];
|
||||||
|
|
@ -214,14 +216,17 @@ internal class PluginInstallerWindow : Window, IDisposable
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public override void Draw()
|
public override void Draw()
|
||||||
{
|
{
|
||||||
this.DrawHeader();
|
lock (this.listLock)
|
||||||
this.DrawPluginCategories();
|
{
|
||||||
this.DrawFooter();
|
this.DrawHeader();
|
||||||
this.DrawErrorModal();
|
this.DrawPluginCategories();
|
||||||
this.DrawUpdateModal();
|
this.DrawFooter();
|
||||||
this.DrawTestingWarningModal();
|
this.DrawErrorModal();
|
||||||
this.DrawFeedbackModal();
|
this.DrawUpdateModal();
|
||||||
this.DrawProgressOverlay();
|
this.DrawTestingWarningModal();
|
||||||
|
this.DrawFeedbackModal();
|
||||||
|
this.DrawProgressOverlay();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -431,7 +436,8 @@ internal class PluginInstallerWindow : Window, IDisposable
|
||||||
this.sortKind = selectable.SortKind;
|
this.sortKind = selectable.SortKind;
|
||||||
this.filterText = selectable.Localization;
|
this.filterText = selectable.Localization;
|
||||||
|
|
||||||
this.ResortPlugins();
|
lock (this.listLock)
|
||||||
|
this.ResortPlugins();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1091,7 +1097,7 @@ internal class PluginInstallerWindow : Window, IDisposable
|
||||||
|
|
||||||
private void DrawPluginCategoryContent()
|
private void DrawPluginCategoryContent()
|
||||||
{
|
{
|
||||||
var ready = this.DrawPluginListLoading() && !this.AnyOperationInProgress;
|
var ready = this.DrawPluginListLoading();
|
||||||
if (!this.categoryManager.IsSelectionValid || !ready)
|
if (!this.categoryManager.IsSelectionValid || !ready)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|
@ -2684,11 +2690,14 @@ internal class PluginInstallerWindow : Window, IDisposable
|
||||||
{
|
{
|
||||||
var pluginManager = Service<PluginManager>.Get();
|
var pluginManager = Service<PluginManager>.Get();
|
||||||
|
|
||||||
// By removing installed plugins only when the available plugin list changes (basically when the window is
|
lock (this.listLock)
|
||||||
// opened), plugins that have been newly installed remain in the available plugin list as installed.
|
{
|
||||||
this.pluginListAvailable = pluginManager.AvailablePlugins.ToList();
|
// By removing installed plugins only when the available plugin list changes (basically when the window is
|
||||||
this.pluginListUpdatable = pluginManager.UpdatablePlugins.ToList();
|
// opened), plugins that have been newly installed remain in the available plugin list as installed.
|
||||||
this.ResortPlugins();
|
this.pluginListAvailable = pluginManager.AvailablePlugins.ToList();
|
||||||
|
this.pluginListUpdatable = pluginManager.UpdatablePlugins.ToList();
|
||||||
|
this.ResortPlugins();
|
||||||
|
}
|
||||||
|
|
||||||
this.UpdateCategoriesOnPluginsChange();
|
this.UpdateCategoriesOnPluginsChange();
|
||||||
}
|
}
|
||||||
|
|
@ -2697,10 +2706,13 @@ internal class PluginInstallerWindow : Window, IDisposable
|
||||||
{
|
{
|
||||||
var pluginManager = Service<PluginManager>.Get();
|
var pluginManager = Service<PluginManager>.Get();
|
||||||
|
|
||||||
this.pluginListInstalled = pluginManager.InstalledPlugins.ToList();
|
lock (this.listLock)
|
||||||
this.pluginListUpdatable = pluginManager.UpdatablePlugins.ToList();
|
{
|
||||||
this.hasDevPlugins = this.pluginListInstalled.Any(plugin => plugin.IsDev);
|
this.pluginListInstalled = pluginManager.InstalledPlugins.ToList();
|
||||||
this.ResortPlugins();
|
this.pluginListUpdatable = pluginManager.UpdatablePlugins.ToList();
|
||||||
|
this.hasDevPlugins = this.pluginListInstalled.Any(plugin => plugin.IsDev);
|
||||||
|
this.ResortPlugins();
|
||||||
|
}
|
||||||
|
|
||||||
this.UpdateCategoriesOnPluginsChange();
|
this.UpdateCategoriesOnPluginsChange();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ using System.Reflection;
|
||||||
|
|
||||||
using Dalamud.Game;
|
using Dalamud.Game;
|
||||||
using Dalamud.Hooking.Internal;
|
using Dalamud.Hooking.Internal;
|
||||||
|
using Dalamud.Interface.Components;
|
||||||
using Dalamud.Interface.Internal.Notifications;
|
using Dalamud.Interface.Internal.Notifications;
|
||||||
using Dalamud.Interface.Windowing;
|
using Dalamud.Interface.Windowing;
|
||||||
using Dalamud.Plugin.Internal;
|
using Dalamud.Plugin.Internal;
|
||||||
|
|
@ -68,6 +69,16 @@ internal class PluginStatWindow : Window
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var loadedPlugins = pluginManager.InstalledPlugins.Where(plugin => plugin.State == PluginState.Loaded);
|
||||||
|
var totalLast = loadedPlugins.Sum(plugin => plugin.DalamudInterface?.UiBuilder.LastDrawTime ?? 0);
|
||||||
|
var totalAverage = loadedPlugins.Sum(plugin => plugin.DalamudInterface?.UiBuilder.DrawTimeHistory.DefaultIfEmpty().Average() ?? 0);
|
||||||
|
|
||||||
|
ImGuiComponents.TextWithLabel("Total Last", $"{totalLast / 10000f:F4}ms", "All last draw times added together");
|
||||||
|
ImGui.SameLine();
|
||||||
|
ImGuiComponents.TextWithLabel("Total Average", $"{totalAverage / 10000f:F4}ms", "All average draw times added together");
|
||||||
|
ImGui.SameLine();
|
||||||
|
ImGuiComponents.TextWithLabel("Collective Average", $"{(loadedPlugins.Any() ? totalAverage / loadedPlugins.Count() / 10000f : 0):F4}ms", "Average of all average draw times");
|
||||||
|
|
||||||
if (ImGui.BeginTable(
|
if (ImGui.BeginTable(
|
||||||
"##PluginStatsDrawTimes",
|
"##PluginStatsDrawTimes",
|
||||||
4,
|
4,
|
||||||
|
|
@ -86,8 +97,6 @@ internal class PluginStatWindow : Window
|
||||||
ImGui.TableSetupColumn("Average");
|
ImGui.TableSetupColumn("Average");
|
||||||
ImGui.TableHeadersRow();
|
ImGui.TableHeadersRow();
|
||||||
|
|
||||||
var loadedPlugins = pluginManager.InstalledPlugins.Where(plugin => plugin.State == PluginState.Loaded);
|
|
||||||
|
|
||||||
var sortSpecs = ImGui.TableGetSortSpecs();
|
var sortSpecs = ImGui.TableGetSortSpecs();
|
||||||
loadedPlugins = sortSpecs.Specs.ColumnIndex switch
|
loadedPlugins = sortSpecs.Specs.ColumnIndex switch
|
||||||
{
|
{
|
||||||
|
|
@ -149,6 +158,16 @@ internal class PluginStatWindow : Window
|
||||||
Framework.StatsHistory.Clear();
|
Framework.StatsHistory.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var statsHistory = Framework.StatsHistory.ToArray();
|
||||||
|
var totalLast = statsHistory.Sum(stats => stats.Value.LastOrDefault());
|
||||||
|
var totalAverage = statsHistory.Sum(stats => stats.Value.Average());
|
||||||
|
|
||||||
|
ImGuiComponents.TextWithLabel("Total Last", $"{totalLast:F4}ms", "All last update times added together");
|
||||||
|
ImGui.SameLine();
|
||||||
|
ImGuiComponents.TextWithLabel("Total Average", $"{totalAverage:F4}ms", "All average update times added together");
|
||||||
|
ImGui.SameLine();
|
||||||
|
ImGuiComponents.TextWithLabel("Collective Average", $"{(statsHistory.Any() ? totalAverage / statsHistory.Length : 0):F4}ms", "Average of all average update times");
|
||||||
|
|
||||||
if (ImGui.BeginTable(
|
if (ImGui.BeginTable(
|
||||||
"##PluginStatsFrameworkTimes",
|
"##PluginStatsFrameworkTimes",
|
||||||
4,
|
4,
|
||||||
|
|
@ -167,8 +186,6 @@ internal class PluginStatWindow : Window
|
||||||
ImGui.TableSetupColumn("Average", ImGuiTableColumnFlags.None, 50);
|
ImGui.TableSetupColumn("Average", ImGuiTableColumnFlags.None, 50);
|
||||||
ImGui.TableHeadersRow();
|
ImGui.TableHeadersRow();
|
||||||
|
|
||||||
var statsHistory = Framework.StatsHistory.ToArray();
|
|
||||||
|
|
||||||
var sortSpecs = ImGui.TableGetSortSpecs();
|
var sortSpecs = ImGui.TableGetSortSpecs();
|
||||||
statsHistory = sortSpecs.Specs.ColumnIndex switch
|
statsHistory = sortSpecs.Specs.ColumnIndex switch
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -55,5 +55,6 @@ public class SettingsTabExperimental : SettingsTab
|
||||||
base.Draw();
|
base.Draw();
|
||||||
|
|
||||||
ImGuiHelpers.SafeTextColoredWrapped(ImGuiColors.DalamudGrey, "Total memory used by Dalamud & Plugins: " + Util.FormatBytes(GC.GetTotalMemory(false)));
|
ImGuiHelpers.SafeTextColoredWrapped(ImGuiColors.DalamudGrey, "Total memory used by Dalamud & Plugins: " + Util.FormatBytes(GC.GetTotalMemory(false)));
|
||||||
|
ImGuiHelpers.ScaledDummy(15);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,7 @@ internal class LocalPlugin : IDisposable
|
||||||
}
|
}
|
||||||
|
|
||||||
var pluginManager = Service<PluginManager>.Get();
|
var pluginManager = Service<PluginManager>.Get();
|
||||||
this.IsBanned = pluginManager.IsManifestBanned(this.Manifest);
|
this.IsBanned = pluginManager.IsManifestBanned(this.Manifest) && !this.IsDev;
|
||||||
this.BanReason = pluginManager.GetBanReason(this.Manifest);
|
this.BanReason = pluginManager.GetBanReason(this.Manifest);
|
||||||
|
|
||||||
this.SaveManifest();
|
this.SaveManifest();
|
||||||
|
|
@ -320,7 +320,7 @@ internal class LocalPlugin : IDisposable
|
||||||
throw new ArgumentOutOfRangeException(this.State.ToString());
|
throw new ArgumentOutOfRangeException(this.State.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pluginManager.IsManifestBanned(this.Manifest))
|
if (pluginManager.IsManifestBanned(this.Manifest) && !this.IsDev)
|
||||||
throw new BannedPluginException($"Unable to load {this.Name}, banned");
|
throw new BannedPluginException($"Unable to load {this.Name}, banned");
|
||||||
|
|
||||||
if (this.Manifest.ApplicableVersion < startInfo.GameVersion)
|
if (this.Manifest.ApplicableVersion < startInfo.GameVersion)
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 08e6c7ed7747ad68a38e5762863b5874fe04b8b8
|
Subproject commit 47ffffaa05ee72d286772cef9ab2f62ab1422e45
|
||||||
Loading…
Add table
Add a link
Reference in a new issue