chore: rename _started

develop
ChocoSwi 2022-11-05 23:22:59 +09:00
parent dfdab31780
commit d53da21bf5
1 changed files with 6 additions and 6 deletions

View File

@ -19,7 +19,7 @@ namespace SkyHook
// ReSharper disable once FieldCanBeMadeReadOnly.Global // ReSharper disable once FieldCanBeMadeReadOnly.Global
public static bool RequireFocus = true; public static bool RequireFocus = true;
private bool _started; public bool isHookActive;
/// <summary> /// <summary>
/// The key updated event data /// The key updated event data
@ -64,7 +64,7 @@ namespace SkyHook
new Thread(() => new Thread(() =>
{ {
if (_started) return; if (isHookActive) return;
var result = SkyHookNative.StartHook(HookCallback); var result = SkyHookNative.StartHook(HookCallback);
@ -73,10 +73,10 @@ namespace SkyHook
exception = new SkyHookException(result); exception = new SkyHookException(result);
} }
_started = true; isHookActive = true;
started = true; started = true;
while (_started) while (isHookActive)
{ {
} }
}).Start(); }).Start();
@ -93,7 +93,7 @@ namespace SkyHook
private void _StopHook() private void _StopHook()
{ {
if (!_started) return; if (!isHookActive) return;
var result = SkyHookNative.StopHook(); var result = SkyHookNative.StopHook();
@ -102,7 +102,7 @@ namespace SkyHook
throw new SkyHookException(result); throw new SkyHookException(result);
} }
_started = false; isHookActive = false;
} }
public static void StartHook() public static void StartHook()