Why does this not work, stupid Conditional.

This commit is contained in:
Ottermandias 2023-04-21 18:47:34 +02:00
parent 9c4f7b7562
commit 10c0117402

View file

@ -30,7 +30,7 @@ public unsafe class GameEventManager : IDisposable
_resourceHandleDestructorHook.Enable();
_characterBaseCreateHook.Enable();
_characterBaseDestructorHook.Enable();
_weaponReloadHook.Enable();
_weaponReloadHook.Enable();
EnableDebugHook();
Penumbra.Log.Verbose($"{Prefix} Created.");
}
@ -268,18 +268,22 @@ public unsafe class GameEventManager : IDisposable
private delegate void TestDelegate(nint a1, int a2);
private void TestDetour(nint a1, int a2)
{
{
Penumbra.Log.Information($"Test: {a1:X} {a2}");
_testHook!.Original(a1, a2);
}
#endif
[Conditional("DEBUG")]
private void EnableDebugHook()
=> _testHook?.Enable();
[Conditional("DEBUG")]
private void DisposeDebugHook()
=> _testHook?.Dispose();
#else
private void EnableDebugHook()
{ }
private void DisposeDebugHook()
{ }
#endif
#endregion
}