diff --git a/Changes.txt b/Changes.txt index 40682cbd5..4ea7c0555 100644 --- a/Changes.txt +++ b/Changes.txt @@ -32,6 +32,8 @@ * Fixed bug when running ROMs using AtariVox controllers; the app would crash upon exiting the ROM. + * Snapshot functionality now works while the emulation is paused. + * Certain textfields in the UI now have filtering enabled, preventing insertion of illegal characters. This will be extended throughout the code in future releases. diff --git a/src/emucore/EventHandler.cxx b/src/emucore/EventHandler.cxx index e9f72461f..820f393be 100644 --- a/src/emucore/EventHandler.cxx +++ b/src/emucore/EventHandler.cxx @@ -551,10 +551,20 @@ void EventHandler::handleKeyEvent(StellaKey key, StellaMod mod, bool state) return; // Otherwise, let the event handler deal with it - if(myState == S_EMULATE) - handleEvent(myKeyTable[key][kEmulationMode], state); - else if(myOverlay != nullptr) - myOverlay->handleKeyEvent(key, mod, state); + switch(myState) + { + case S_EMULATE: + handleEvent(myKeyTable[key][kEmulationMode], state); + break; + case S_PAUSE: + if(myKeyTable[key][kEmulationMode] == Event::TakeSnapshot) + handleEvent(myKeyTable[key][kEmulationMode], state); + break; + default: + if(myOverlay != nullptr) + myOverlay->handleKeyEvent(key, mod, state); + break; + } } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -812,10 +822,10 @@ void EventHandler::handleSystemEvent(SystemEvent e, int, int) { switch(e) { -#if 0 case EVENT_WINDOW_EXPOSED: - myOSystem.frameBuffer().refresh(); + myOSystem.frameBuffer().update(); break; +#if 0 case EVENT_WINDOW_MINIMIZED: if(myState == S_EMULATE) enterMenuMode(S_MENU); break;