diff --git a/macosx/Snes9x/S9xPrefsViewController.xib b/macosx/Snes9x/S9xPrefsViewController.xib index b7e176a25..9cbe41606 100644 --- a/macosx/Snes9x/S9xPrefsViewController.xib +++ b/macosx/Snes9x/S9xPrefsViewController.xib @@ -1,8 +1,8 @@ - + - + @@ -189,7 +189,7 @@ - + diff --git a/macosx/mac-os.mm b/macosx/mac-os.mm index 66a68f5ec..64f7011c7 100644 --- a/macosx/mac-os.mm +++ b/macosx/mac-os.mm @@ -295,6 +295,7 @@ SNES9X for Mac OS (c) Copyright John Stiles static volatile bool8 rejectinput = false; static bool8 pauseEmulation = false, + escKeyDown = false, frameAdvance = false; static int frameCount = 0; @@ -2245,14 +2246,22 @@ static void ProcessInput (void) if (ISpKeyIsPressed(keys, gamepadButtons, kISpEsc)) { - pauseEmulation = true; - [s9xView updatePauseOverlay]; + if (!escKeyDown) + { + escKeyDown = true; + pauseEmulation = !pauseEmulation; + [s9xView updatePauseOverlay]; - dispatch_async(dispatch_get_main_queue(), ^ - { - [s9xView setNeedsDisplay:YES]; - }); + dispatch_async(dispatch_get_main_queue(), ^ + { + [s9xView setNeedsDisplay:YES]; + }); + } } + else + { + escKeyDown = false; + } if (ISpKeyIsPressed(keys, gamepadButtons, kISpFreeze)) {