Card::Save/LoadSnapshot (PR #1003)

Add 2 virtual methods to Card to load and save snapshots.
This commit is contained in:
Andrea
2021-11-25 20:23:21 +00:00
committed by GitHub
parent abc631432d
commit 0b2104cc89
25 changed files with 132 additions and 148 deletions

View File

@@ -50,8 +50,6 @@ bool g_bFilterUnprintable = true;
bool g_bPrinterAppend = false;
bool g_bEnableDumpToRealPrinter = false;
static UINT g_uSlot = 0;
//===========================================================================
static BYTE __stdcall PrintStatus(WORD, WORD, BYTE, BYTE, ULONG);
@@ -71,8 +69,6 @@ VOID PrintLoadRom(LPBYTE pCxRomPeripheral, const UINT uSlot)
//
RegisterIoHandler(uSlot, PrintStatus, PrintTransmit, NULL, NULL, NULL, NULL);
g_uSlot = uSlot;
}
//===========================================================================
@@ -215,9 +211,9 @@ std::string Printer_GetSnapshotCardName(void)
return name;
}
void Printer_SaveSnapshot(class YamlSaveHelper& yamlSaveHelper)
void Printer_SaveSnapshot(class YamlSaveHelper& yamlSaveHelper, const UINT uSlot)
{
YamlSaveHelper::Slot slot(yamlSaveHelper, Printer_GetSnapshotCardName(), g_uSlot, 1);
YamlSaveHelper::Slot slot(yamlSaveHelper, Printer_GetSnapshotCardName(), uSlot, 1);
YamlSaveHelper::Label state(yamlSaveHelper, "%s:\n", SS_YAML_KEY_STATE);
yamlSaveHelper.SaveUint(SS_YAML_KEY_INACTIVITY, inactivity);