From 6daa419fd6fe847531b816dfd9d7bc0b51e84443 Mon Sep 17 00:00:00 2001 From: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com> Date: Wed, 26 Jul 2023 19:33:06 +0300 Subject: [PATCH] Map toggle running function to hotkey --- src/emulator.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/emulator.cpp b/src/emulator.cpp index e04f073d..c5ea26d1 100644 --- a/src/emulator.cpp +++ b/src/emulator.cpp @@ -171,6 +171,12 @@ void Emulator::run() { case SDLK_RETURN: hid.pressKey(Keys::Start); break; case SDLK_BACKSPACE: hid.pressKey(Keys::Select); break; + + // Use the play button as a hot-key to pause or resume the emulator + case SDLK_AUDIOPLAY: { + running ? pause() : resume(); + break; + } } break;