diff options
Diffstat (limited to 'ARMeilleure/State/ExecutionContext.cs')
-rw-r--r-- | ARMeilleure/State/ExecutionContext.cs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ARMeilleure/State/ExecutionContext.cs b/ARMeilleure/State/ExecutionContext.cs index 482665db..57a05dbf 100644 --- a/ARMeilleure/State/ExecutionContext.cs +++ b/ARMeilleure/State/ExecutionContext.cs @@ -5,7 +5,7 @@ namespace ARMeilleure.State { public class ExecutionContext { - private const int MinCountForCheck = 40000; + private const int MinCountForCheck = 4000; private NativeContext _nativeContext; @@ -57,7 +57,7 @@ namespace ARMeilleure.State } } - public bool Running { get; set; } + internal bool Running { get; private set; } public event EventHandler<EventArgs> Interrupt; public event EventHandler<InstExceptionEventArgs> Break; @@ -126,6 +126,12 @@ namespace ARMeilleure.State Undefined?.Invoke(this, new InstUndefinedEventArgs(address, opCode)); } + public void StopRunning() + { + Running = false; + _nativeContext.SetCounter(0); + } + public void Dispose() { _nativeContext.Dispose(); |