Mac: pause emulation when the user clicks the view

This commit is contained in:
Michael Buckley 2019-11-10 13:19:51 -08:00
parent 629296a5c4
commit bb619e5597
1 changed files with 6 additions and 0 deletions

View File

@ -2907,6 +2907,12 @@ void QuitWithFatalError ( NSString *message)
os_unfair_lock_unlock(&keyLock); os_unfair_lock_unlock(&keyLock);
} }
- (void)mouseDown:(NSEvent *)event
{
pauseEmulation = true;
[self setNeedsDisplay:YES];
}
- (void)drawRect:(NSRect)dirtyRect - (void)drawRect:(NSRect)dirtyRect
{ {
os_unfair_lock_lock(&renderLock); os_unfair_lock_lock(&renderLock);