mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Merge pull request #388 from Philpax/persistent-anti-anti-debug
This commit is contained in:
commit
60d58b8941
4 changed files with 18 additions and 3 deletions
|
|
@ -138,6 +138,11 @@ namespace Dalamud.Configuration
|
|||
/// </summary>
|
||||
public bool IsGamepadNavigationEnabled { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether or not the anti-anti-debug check is enabled on startup.
|
||||
/// </summary>
|
||||
public bool IsAntiAntiDebugEnabled { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Load a configuration from the provided path.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -229,8 +229,11 @@ namespace Dalamud
|
|||
this.Configuration = DalamudConfiguration.Load(this.StartInfo.ConfigurationPath);
|
||||
|
||||
this.AntiDebug = new AntiDebug(this.SigScanner);
|
||||
if (this.Configuration.IsAntiAntiDebugEnabled)
|
||||
this.AntiDebug.Enable();
|
||||
#if DEBUG
|
||||
this.AntiDebug.Enable();
|
||||
if (!this.AntiDebug.IsEnabled)
|
||||
this.AntiDebug.Enable();
|
||||
#endif
|
||||
|
||||
Log.Information("[T2] AntiDebug OK!");
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ namespace Dalamud.Game.Internal
|
|||
/// <summary>
|
||||
/// Gets a value indicating whether the anti-debugging is enabled.
|
||||
/// </summary>
|
||||
public bool IsEnabled { get; private set; }
|
||||
public bool IsEnabled { get; private set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Enables the anti-debugging by overwriting code in memory.
|
||||
|
|
|
|||
|
|
@ -198,7 +198,14 @@ namespace Dalamud.Interface
|
|||
|
||||
if (ImGui.MenuItem("Enable AntiDebug", null, this.dalamud.AntiDebug.IsEnabled))
|
||||
{
|
||||
this.dalamud.AntiDebug.Enable();
|
||||
var newEnabled = !this.dalamud.AntiDebug.IsEnabled;
|
||||
if (newEnabled)
|
||||
this.dalamud.AntiDebug.Enable();
|
||||
else
|
||||
this.dalamud.AntiDebug.Disable();
|
||||
|
||||
this.dalamud.Configuration.IsAntiAntiDebugEnabled = newEnabled;
|
||||
this.dalamud.Configuration.Save();
|
||||
}
|
||||
|
||||
ImGui.Separator();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue