mirror of
https://github.com/AppleWin/AppleWin.git
synced 2026-04-25 19:19:02 +00:00
Change to using Registry's 'Configuration\Slot n' for disk ii image pathnames (was 'Preferences'). Delete Registry's 'Configuration\Slot n' section each time there's a change of card. Add same functionality to conf.ini. LoadConfiguration(): load from the new Slot-n section (or otherwise the old legacy key). Only update Registry's 'Starting Directory' for s6,d1. Update help doc.
This commit is contained in:
@@ -128,23 +128,15 @@ void CPropertySheetHelper::SetSlot(UINT slot, SS_CARDTYPE newCardType)
|
||||
// Two paths:
|
||||
// 1) Via Config dialog: card not inserted yet
|
||||
// 2) Snapshot_LoadState_v2(): card already inserted
|
||||
if (GetCardMgr().QuerySlot(slot) != newCardType)
|
||||
GetCardMgr().Insert(slot, newCardType);
|
||||
if (GetCardMgr().QuerySlot(slot) == newCardType)
|
||||
return;
|
||||
|
||||
std::string slotText;
|
||||
switch (slot)
|
||||
{
|
||||
case 0: slotText = REGVALUE_SLOT0; break;
|
||||
case 1: slotText = REGVALUE_SLOT1; break;
|
||||
case 2: slotText = REGVALUE_SLOT2; break;
|
||||
case 3: slotText = REGVALUE_SLOT3; break;
|
||||
case 4: slotText = REGVALUE_SLOT4; break;
|
||||
case 5: slotText = REGVALUE_SLOT5; break;
|
||||
case 6: slotText = REGVALUE_SLOT6; break;
|
||||
case 7: slotText = REGVALUE_SLOT7; break;
|
||||
}
|
||||
GetCardMgr().Insert(slot, newCardType);
|
||||
|
||||
REGSAVE(slotText.c_str(), (DWORD)newCardType);
|
||||
RegDeleteConfigSlotSection(slot);
|
||||
|
||||
std::string& regSection = RegGetConfigSlotSection(slot);
|
||||
RegSaveValue(regSection.c_str(), REGVALUE_CARD_TYPE, TRUE, newCardType);
|
||||
}
|
||||
|
||||
// Used by:
|
||||
@@ -395,6 +387,7 @@ void CPropertySheetHelper::SaveCurrentConfig(void)
|
||||
m_ConfigOld.m_CpuType = GetMainCpu();
|
||||
m_ConfigOld.m_Slot[SLOT4] = GetCardMgr().QuerySlot(SLOT4);
|
||||
m_ConfigOld.m_Slot[SLOT5] = GetCardMgr().QuerySlot(SLOT5);
|
||||
m_ConfigOld.m_Slot[SLOT6] = GetCardMgr().QuerySlot(SLOT6); // CPageDisk::HandleFloppyDriveCombo() needs this to be CT_Disk2 (temp, as will replace with PR #955)
|
||||
m_ConfigOld.m_bEnableHDD = HD_CardIsEnabled();
|
||||
m_ConfigOld.m_bEnableTheFreezesF8Rom = GetPropertySheet().GetTheFreezesF8Rom();
|
||||
m_ConfigOld.m_videoRefreshRate = GetVideo().GetVideoRefreshRate();
|
||||
@@ -414,8 +407,8 @@ void CPropertySheetHelper::RestoreCurrentConfig(void)
|
||||
// NB. clone-type is encoded in g_Apple2Type
|
||||
SetApple2Type(m_ConfigOld.m_Apple2Type);
|
||||
SetMainCpu(m_ConfigOld.m_CpuType);
|
||||
GetCardMgr().Insert(SLOT4, m_ConfigOld.m_Slot[SLOT4]);
|
||||
GetCardMgr().Insert(SLOT5, m_ConfigOld.m_Slot[SLOT5]);
|
||||
SetSlot(SLOT4, m_ConfigOld.m_Slot[SLOT4]);
|
||||
SetSlot(SLOT5, m_ConfigOld.m_Slot[SLOT5]);
|
||||
HD_SetEnabled(m_ConfigOld.m_bEnableHDD);
|
||||
GetPropertySheet().SetTheFreezesF8Rom(m_ConfigOld.m_bEnableTheFreezesF8Rom);
|
||||
m_ConfigNew.m_videoRefreshRate = m_ConfigOld.m_videoRefreshRate; // Not SetVideoRefreshRate(), as this re-inits much Video/NTSC state!
|
||||
|
||||
Reference in New Issue
Block a user