mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +01:00
feat: add checkbox for AntiDebug to dev menu
This commit is contained in:
parent
0a227fd2b7
commit
00b263f08e
3 changed files with 18 additions and 8 deletions
|
|
@ -58,6 +58,9 @@ namespace Dalamud {
|
||||||
|
|
||||||
public readonly DataManager Data;
|
public readonly DataManager Data;
|
||||||
|
|
||||||
|
private AntiDebug antiDebug;
|
||||||
|
|
||||||
|
|
||||||
private readonly string assemblyVersion = Assembly.GetAssembly(typeof(ChatHandlers)).GetName().Version.ToString();
|
private readonly string assemblyVersion = Assembly.GetAssembly(typeof(ChatHandlers)).GetName().Version.ToString();
|
||||||
|
|
||||||
public Dalamud(DalamudStartInfo info) {
|
public Dalamud(DalamudStartInfo info) {
|
||||||
|
|
@ -153,6 +156,8 @@ namespace Dalamud {
|
||||||
this.WinSock2.Dispose();
|
this.WinSock2.Dispose();
|
||||||
|
|
||||||
this.SigScanner.Dispose();
|
this.SigScanner.Dispose();
|
||||||
|
|
||||||
|
this.antiDebug?.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Interface
|
#region Interface
|
||||||
|
|
@ -165,6 +170,8 @@ namespace Dalamud {
|
||||||
private bool isImguiDrawDevMenu = false;
|
private bool isImguiDrawDevMenu = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
private bool isAntiDebugEnabled = false;
|
||||||
|
|
||||||
private bool isImguiDrawLogWindow = false;
|
private bool isImguiDrawLogWindow = false;
|
||||||
private bool isImguiDrawDataWindow = false;
|
private bool isImguiDrawDataWindow = false;
|
||||||
private bool isImguiDrawPluginWindow = false;
|
private bool isImguiDrawPluginWindow = false;
|
||||||
|
|
@ -204,6 +211,15 @@ namespace Dalamud {
|
||||||
}
|
}
|
||||||
ImGui.MenuItem("Draw ImGui demo", "", ref this.isImguiDrawDemoWindow);
|
ImGui.MenuItem("Draw ImGui demo", "", ref this.isImguiDrawDemoWindow);
|
||||||
ImGui.Separator();
|
ImGui.Separator();
|
||||||
|
if (ImGui.MenuItem("Enable AntiDebug", "", ref this.isAntiDebugEnabled)) {
|
||||||
|
if (this.isAntiDebugEnabled) {
|
||||||
|
this.antiDebug = new AntiDebug();
|
||||||
|
this.antiDebug.Enable();
|
||||||
|
} else {
|
||||||
|
this.antiDebug?.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ImGui.Separator();
|
||||||
if (ImGui.MenuItem("Unload Dalamud"))
|
if (ImGui.MenuItem("Unload Dalamud"))
|
||||||
{
|
{
|
||||||
Unload();
|
Unload();
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ namespace Dalamud.Game.Internal
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Enable() {
|
public void Enable() {
|
||||||
//this.debuggerPresentHook.Enable();
|
this.debuggerPresentHook.Enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose() {
|
public void Dispose() {
|
||||||
|
|
|
||||||
|
|
@ -43,9 +43,7 @@ namespace Dalamud.Game.Internal {
|
||||||
|
|
||||||
public LibcFunction Libc { get; private set; }
|
public LibcFunction Libc { get; private set; }
|
||||||
|
|
||||||
private AntiDebug antiDebug;
|
#endregion
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
public Framework(SigScanner scanner, Dalamud dalamud) {
|
public Framework(SigScanner scanner, Dalamud dalamud) {
|
||||||
Address = new FrameworkAddressResolver();
|
Address = new FrameworkAddressResolver();
|
||||||
|
|
@ -67,8 +65,6 @@ namespace Dalamud.Game.Internal {
|
||||||
Network = new GameNetwork(dalamud, scanner);
|
Network = new GameNetwork(dalamud, scanner);
|
||||||
|
|
||||||
//Resource = new ResourceManager(dalamud, scanner);
|
//Resource = new ResourceManager(dalamud, scanner);
|
||||||
|
|
||||||
this.antiDebug = new AntiDebug();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HookVTable() {
|
private void HookVTable() {
|
||||||
|
|
@ -85,7 +81,6 @@ namespace Dalamud.Game.Internal {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Enable() {
|
public void Enable() {
|
||||||
this.antiDebug.Enable();
|
|
||||||
Gui.Enable();
|
Gui.Enable();
|
||||||
Network.Enable();
|
Network.Enable();
|
||||||
//Resource.Enable();
|
//Resource.Enable();
|
||||||
|
|
@ -94,7 +89,6 @@ namespace Dalamud.Game.Internal {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose() {
|
public void Dispose() {
|
||||||
this.antiDebug.Dispose();
|
|
||||||
Gui.Dispose();
|
Gui.Dispose();
|
||||||
Network.Dispose();
|
Network.Dispose();
|
||||||
//Resource.Dispose();
|
//Resource.Dispose();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue