Skip to content

Commit

Permalink
CommonFrame: implement LoadSnapshot().
Browse files Browse the repository at this point in the history
From SDLFrame.

Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
  • Loading branch information
audetto committed Dec 23, 2023
1 parent a55dae9 commit a459413
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
7 changes: 7 additions & 0 deletions source/frontends/common2/commonframe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,13 @@ namespace common2
return myHardwareConfig != currentConfig;
}

void CommonFrame::LoadSnapshot()
{
LinuxFrame::LoadSnapshot();
ResetSpeed();
ResetHardware();
}

}

void SingleStep(bool /* bReinit */)
Expand Down
2 changes: 2 additions & 0 deletions source/frontends/common2/commonframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ namespace common2
void ResetHardware();
bool HardwareChanged() const;

void LoadSnapshot() override;

protected:
virtual std::string getResourcePath(const std::string & filename) = 0;

Expand Down
7 changes: 0 additions & 7 deletions source/frontends/sdl/sdlframe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -624,13 +624,6 @@ namespace sa2
ResetSpeed();
}

void SDLFrame::LoadSnapshot()
{
common2::CommonFrame::LoadSnapshot();
ResetSpeed();
ResetHardware();
}

common2::Geometry SDLFrame::getGeometryOrDefault(const std::optional<common2::Geometry> & geometry) const
{
if (geometry)
Expand Down
2 changes: 0 additions & 2 deletions source/frontends/sdl/sdlframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ namespace sa2

void FrameResetMachineState();

void LoadSnapshot() override;

const std::shared_ptr<SDL_Window> & GetWindow() const;

void getDragDropSlotAndDrive(size_t & slot, size_t & drive) const;
Expand Down

0 comments on commit a459413

Please sign in to comment.