From adddc635f273bde3fb70d99abb564b744bd7a599 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Fri, 14 Jul 2017 20:24:29 -0230 Subject: [PATCH] Pressing F12 in the debugger saves snapshots (implements #161). --- Changes.txt | 2 ++ src/debugger/gui/DebuggerDialog.cxx | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/Changes.txt b/Changes.txt index e09466f15..4733212bc 100644 --- a/Changes.txt +++ b/Changes.txt @@ -69,6 +69,8 @@ clearly indicate if an item can be modified. - Debugger '.lst' and '.sym' files are now searched based on the name of the ROM file, and not on the internal properties name. + - Snapshots can now be saved by pressing F12 key (the various other + ways to save snapshots still exist). * Mouse grabbing is now enabled in windowed mode only when the ROM is using a virtual analog controller (paddles, trakball, etc). diff --git a/src/debugger/gui/DebuggerDialog.cxx b/src/debugger/gui/DebuggerDialog.cxx index 7c835e92e..3bb2827c5 100644 --- a/src/debugger/gui/DebuggerDialog.cxx +++ b/src/debugger/gui/DebuggerDialog.cxx @@ -83,6 +83,10 @@ void DebuggerDialog::handleKeyDown(StellaKey key, StellaMod mod) // Swallow backtick, so we don't see it when exiting the debugger instance().eventHandler().enableTextEvents(false); } + else if(key == KBDK_F12) + { + instance().debugger().parser().run("savesnap"); + } else if(instance().eventHandler().kbdControl(mod)) { switch(key)