mirror of https://github.com/stella-emu/stella.git
support F12 (snapshot) in TM UI too (implements #679)
This commit is contained in:
parent
f9194bbfb4
commit
93494fc7d3
|
@ -25,6 +25,7 @@
|
||||||
#include "StateManager.hxx"
|
#include "StateManager.hxx"
|
||||||
#include "RewindManager.hxx"
|
#include "RewindManager.hxx"
|
||||||
#include "TimeLineWidget.hxx"
|
#include "TimeLineWidget.hxx"
|
||||||
|
#include "TIASurface.hxx"
|
||||||
|
|
||||||
#include "Console.hxx"
|
#include "Console.hxx"
|
||||||
#include "TIA.hxx"
|
#include "TIA.hxx"
|
||||||
|
@ -297,6 +298,8 @@ void TimeMachineDialog::handleKeyDown(StellaKey key, StellaMod mod, bool repeate
|
||||||
// The following 'Alt' shortcuts duplicate the shortcuts in EventHandler
|
// The following 'Alt' shortcuts duplicate the shortcuts in EventHandler
|
||||||
// It is best to keep them the same, so changes in EventHandler mean we
|
// It is best to keep them the same, so changes in EventHandler mean we
|
||||||
// need to update the logic here too
|
// need to update the logic here too
|
||||||
|
// Note: The hotkeys can be remapped in emulation mode, but this will not
|
||||||
|
// affect the fixed hotkeys here.
|
||||||
if(StellaModTest::isAlt(mod))
|
if(StellaModTest::isAlt(mod))
|
||||||
{
|
{
|
||||||
switch(key)
|
switch(key)
|
||||||
|
@ -323,6 +326,8 @@ void TimeMachineDialog::handleKeyDown(StellaKey key, StellaMod mod, bool repeate
|
||||||
}
|
}
|
||||||
else if(key == KBDK_SPACE || key == KBDK_ESCAPE)
|
else if(key == KBDK_SPACE || key == KBDK_ESCAPE)
|
||||||
handleCommand(nullptr, kPlay, 0, 0);
|
handleCommand(nullptr, kPlay, 0, 0);
|
||||||
|
else if (key == KBDK_F12)
|
||||||
|
handleCommand(nullptr, kSnapShot, 0, 0);
|
||||||
else
|
else
|
||||||
Dialog::handleKeyDown(key, mod);
|
Dialog::handleKeyDown(key, mod);
|
||||||
}
|
}
|
||||||
|
@ -383,6 +388,10 @@ void TimeMachineDialog::handleCommand(CommandSender* sender, int cmd,
|
||||||
initBar();
|
initBar();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case kSnapShot:
|
||||||
|
instance().frameBuffer().tiaSurface().saveSnapShot();
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Dialog::handleCommand(sender, cmd, data, 0);
|
Dialog::handleCommand(sender, cmd, data, 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,8 +65,9 @@ class TimeMachineDialog : public Dialog
|
||||||
kUnwindAll = 'TMua',
|
kUnwindAll = 'TMua',
|
||||||
kUnwind10 = 'TMu1',
|
kUnwind10 = 'TMu1',
|
||||||
kUnwind1 = 'TMun',
|
kUnwind1 = 'TMun',
|
||||||
kSaveAll = 'TMsv',
|
kSaveAll = 'TMsv',
|
||||||
kLoadAll = 'TMld',
|
kLoadAll = 'TMld',
|
||||||
|
kSnapShot = 'TMsn',
|
||||||
};
|
};
|
||||||
|
|
||||||
TimeLineWidget* myTimeline{nullptr};
|
TimeLineWidget* myTimeline{nullptr};
|
||||||
|
|
Loading…
Reference in New Issue