. loading disk state (v5)
. string append bug introduced in 'char* to std::string' PR #687
This commit is contained in:
tomcw 2019-10-06 16:39:43 +01:00
parent 94926b4f55
commit 7265dee506
2 changed files with 6 additions and 6 deletions

View file

@ -762,10 +762,7 @@ bool SetCurrentImageDir(const std::string & pszImageDir)
int nLen = g_sCurrentDir.size();
if ((nLen > 0) && (g_sCurrentDir[ nLen - 1 ] != '\\'))
{
g_sCurrentDir[ nLen + 0 ] = '\\';
g_sCurrentDir.resize(nLen + 1);
}
g_sCurrentDir += '\\';
if( SetCurrentDirectory(g_sCurrentDir.c_str()) )
return true;

View file

@ -2005,8 +2005,6 @@ bool Disk2InterfaceCard::LoadSnapshot(class YamlLoadHelper& yamlLoadHelper, UINT
m_enhanceDisk = yamlLoadHelper.LoadBool(SS_YAML_KEY_ENHANCE_DISK);
m_floppyLatch = yamlLoadHelper.LoadUint(SS_YAML_KEY_FLOPPY_LATCH);
m_floppyMotorOn = yamlLoadHelper.LoadBool(SS_YAML_KEY_FLOPPY_MOTOR_ON);
m_seqFunc.writeMode = yamlLoadHelper.LoadBool(SS_YAML_KEY_FLOPPY_WRITE_MODE) ? 1 : 0;
m_seqFunc.loadMode = 0; // Wasn't saved until v5 - overwritten later if v5
if (version >= 2)
{
@ -2030,6 +2028,11 @@ bool Disk2InterfaceCard::LoadSnapshot(class YamlLoadHelper& yamlLoadHelper, UINT
{
m_seqFunc.function = (SEQFUNC) yamlLoadHelper.LoadInt(SS_YAML_KEY_LSS_SEQUENCER_FUNCTION);
}
else
{
m_seqFunc.writeMode = yamlLoadHelper.LoadBool(SS_YAML_KEY_FLOPPY_WRITE_MODE) ? 1 : 0;
m_seqFunc.loadMode = 0; // Wasn't saved until v5
}
// Eject all disks first in case Drive-2 contains disk to be inserted into Drive-1
for (UINT i=0; i<NUM_DRIVES; i++)