mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
chore: cleanup warnings, always load banned dev plugins
This commit is contained in:
parent
9a32da7db8
commit
d81f218155
4 changed files with 24 additions and 23 deletions
|
|
@ -260,7 +260,6 @@ namespace Dalamud.Injector
|
|||
|
||||
for (var i = 2; i < args.Count; i++)
|
||||
{
|
||||
Log.Information(args[i]);
|
||||
if (args[i].StartsWith(key = "--dalamud-working-directory="))
|
||||
workingDirectory = args[i][key.Length..];
|
||||
else if (args[i].StartsWith(key = "--dalamud-configuration-path="))
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
/// Helper for ScanText to get the correct address for IDA sigs that mark the first JMP or CALL location.
|
||||
/// </summary>
|
||||
|
|
@ -578,4 +558,25 @@ public class SigScanner : IDisposable, IServiceType
|
|||
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++);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,5 +55,6 @@ public class SettingsTabExperimental : SettingsTab
|
|||
base.Draw();
|
||||
|
||||
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();
|
||||
this.IsBanned = pluginManager.IsManifestBanned(this.Manifest);
|
||||
this.IsBanned = pluginManager.IsManifestBanned(this.Manifest) && !this.IsDev;
|
||||
this.BanReason = pluginManager.GetBanReason(this.Manifest);
|
||||
|
||||
this.SaveManifest();
|
||||
|
|
@ -320,7 +320,7 @@ internal class LocalPlugin : IDisposable
|
|||
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");
|
||||
|
||||
if (this.Manifest.ApplicableVersion < startInfo.GameVersion)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue