mirror of
https://github.com/AppleWin/AppleWin.git
synced 2026-10-24 23:02:25 +00:00
Fix bad_cast for inconsistent cmd-line options. Allow Parallel, SSC & VidHD card insertion into any slot. Allow floppy/HDD image insertion into any slot. . if inserting a floppy image, and the slot had no Disk II card, then insert one (consistent with HDD images).
This commit is contained in:
1 parent
fabc5104f3
commit
22dca96cbb
6 files changed
+132
-170
No files matched your search
@@ -170,8 +170,15 @@ void Snapshot_GetDefaultFilenameAndPath(std::string& defaultFilename, std::strin
|
||||
// Attempt to get a default filename/path based on harddisk plugged-in or floppy disk inserted
|
||||
// . Priority given to harddisk over floppy images
|
||||
|
||||
if (GetCardMgr().QuerySlot(SLOT7) == CT_GenericHDD)
|
||||
dynamic_cast<HarddiskInterfaceCard&>(GetCardMgr().GetRef(SLOT7)).GetFilenameAndPathForSaveState(defaultFilename, defaultPath);
|
||||
for (int i = NUM_SLOTS - 1; i >= 0; i--) // scan slots backwards: 7->0
|
||||
{
|
||||
if (GetCardMgr().QuerySlot(i) == CT_GenericHDD)
|
||||
{
|
||||
dynamic_cast<HarddiskInterfaceCard&>(GetCardMgr().GetRef(SLOT7)).GetFilenameAndPathForSaveState(defaultFilename, defaultPath);
|
||||
if (!defaultFilename.empty())
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (defaultFilename.empty())
|
||||
GetCardMgr().GetDisk2CardMgr().GetFilenameAndPathForSaveState(defaultFilename, defaultPath);
|
||||
|
||||
Reference in new issue
Block a user