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>
|
/// </summary>
|
||||||
public bool IsGamepadNavigationEnabled { get; set; } = true;
|
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>
|
/// <summary>
|
||||||
/// Load a configuration from the provided path.
|
/// Load a configuration from the provided path.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -229,7 +229,10 @@ namespace Dalamud
|
||||||
this.Configuration = DalamudConfiguration.Load(this.StartInfo.ConfigurationPath);
|
this.Configuration = DalamudConfiguration.Load(this.StartInfo.ConfigurationPath);
|
||||||
|
|
||||||
this.AntiDebug = new AntiDebug(this.SigScanner);
|
this.AntiDebug = new AntiDebug(this.SigScanner);
|
||||||
|
if (this.Configuration.IsAntiAntiDebugEnabled)
|
||||||
|
this.AntiDebug.Enable();
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
if (!this.AntiDebug.IsEnabled)
|
||||||
this.AntiDebug.Enable();
|
this.AntiDebug.Enable();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ namespace Dalamud.Game.Internal
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicating whether the anti-debugging is enabled.
|
/// Gets a value indicating whether the anti-debugging is enabled.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsEnabled { get; private set; }
|
public bool IsEnabled { get; private set; } = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Enables the anti-debugging by overwriting code in memory.
|
/// 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))
|
if (ImGui.MenuItem("Enable AntiDebug", null, this.dalamud.AntiDebug.IsEnabled))
|
||||||
{
|
{
|
||||||
|
var newEnabled = !this.dalamud.AntiDebug.IsEnabled;
|
||||||
|
if (newEnabled)
|
||||||
this.dalamud.AntiDebug.Enable();
|
this.dalamud.AntiDebug.Enable();
|
||||||
|
else
|
||||||
|
this.dalamud.AntiDebug.Disable();
|
||||||
|
|
||||||
|
this.dalamud.Configuration.IsAntiAntiDebugEnabled = newEnabled;
|
||||||
|
this.dalamud.Configuration.Save();
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.Separator();
|
ImGui.Separator();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue