Fix adaptive speed on snapshot load.

Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
This commit is contained in:
Andrea Odetti 2021-03-27 20:05:41 +00:00
parent b56ccf8eb4
commit a2f89c78db
2 changed files with 9 additions and 0 deletions

View file

@ -127,6 +127,12 @@ namespace sa2
{
}
void SDLFrame::Initialize()
{
CommonFrame::Initialize();
mySpeed.reset();
}
void SDLFrame::FrameRefreshStatus(int drawflags)
{
if (drawflags & DRAW_TITLE)
@ -253,6 +259,7 @@ namespace sa2
if (strlen(filename) > strlen(yaml) && !strcmp(filename + strlen(filename) - strlen(yaml), yaml))
{
common2::setSnapshotFilename(filename, true);
mySpeed.reset();
}
else
{

View file

@ -18,6 +18,8 @@ namespace sa2
public:
SDLFrame(const common2::EmulatorOptions & options);
void Initialize() override;
void VideoPresentScreen() override;
void FrameRefreshStatus(int drawflags) override;
int FrameMessageBox(LPCSTR lpText, LPCSTR lpCaption, UINT uType) override;