mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-01-23 08:33:24 +00:00
Fix for AppleWin-Test:
. don't load floppy/harddisk images (in Registry's Config) if also loading a save-state via cmd-line. . done to prevent MessageBox alerts when deleted disk images can't be found. Info: Registry contains refs to disk images, but on test clean-up, the images get deleted.
This commit is contained in:
parent
177c9fec05
commit
1670e0dbc0
@ -88,8 +88,11 @@ static void LoadConfigOldJoystick_v1(const UINT uJoyNum)
|
||||
JoySetJoyType(uJoyNum, uNewJoyType);
|
||||
}
|
||||
|
||||
//Reads configuration from the registry entries
|
||||
void LoadConfiguration(void)
|
||||
// Reads configuration from the registry entries
|
||||
//
|
||||
// NB. loadImages=false if loading a save-state from cmd-line afterwards
|
||||
// - Registry images may have been deleted from disk, so avoid the MessageBox
|
||||
void LoadConfiguration(bool loadImages)
|
||||
{
|
||||
DWORD dwComputerType = 0;
|
||||
eApple2Type apple2Type = A2TYPE_APPLE2EENHANCED;
|
||||
@ -309,7 +312,7 @@ void LoadConfiguration(void)
|
||||
GetCurrentDirectory(sizeof(szFilename), szFilename);
|
||||
SetCurrentImageDir(szFilename);
|
||||
|
||||
if (GetCardMgr().QuerySlot(SLOT7) == CT_GenericHDD)
|
||||
if (loadImages && GetCardMgr().QuerySlot(SLOT7) == CT_GenericHDD)
|
||||
{
|
||||
dynamic_cast<HarddiskInterfaceCard&>(GetCardMgr().GetRef(SLOT7)).LoadLastDiskImage(HARDDISK_1);
|
||||
dynamic_cast<HarddiskInterfaceCard&>(GetCardMgr().GetRef(SLOT7)).LoadLastDiskImage(HARDDISK_2);
|
||||
@ -323,7 +326,8 @@ void LoadConfiguration(void)
|
||||
GetCurrentDirectory(sizeof(szFilename), szFilename);
|
||||
SetCurrentImageDir(szFilename);
|
||||
|
||||
GetCardMgr().GetDisk2CardMgr().LoadLastDiskImage();
|
||||
if (loadImages)
|
||||
GetCardMgr().GetDisk2CardMgr().LoadLastDiskImage();
|
||||
|
||||
// Do this after populating the slots with Disk II controller(s)
|
||||
DWORD dwEnhanceDisk;
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include "Harddisk.h"
|
||||
|
||||
|
||||
void LoadConfiguration();
|
||||
void LoadConfiguration(bool loadImages);
|
||||
void InsertFloppyDisks(const UINT slot, LPCSTR szImageName_drive[NUM_DRIVES], bool driveConnected[NUM_DRIVES], bool& bBoot);
|
||||
void InsertHardDisks(LPCSTR szImageName_harddisk[NUM_HARDDISKS], bool& bBoot);
|
||||
void GetAppleWindowTitle();
|
||||
|
@ -674,8 +674,11 @@ static void RepeatInitialization(void)
|
||||
// NB. g_OldAppleWinVersion needed by LoadConfiguration() -> Config_Load_Video()
|
||||
const bool bShowAboutDlg = CheckOldAppleWinVersion(); // Post: g_OldAppleWinVersion
|
||||
|
||||
LoadConfiguration();
|
||||
LogFileOutput("Main: LoadConfiguration()\n");
|
||||
{
|
||||
bool loadImages = g_cmdLine.szSnapshotName == NULL; // don't load floppy/harddisk images if a snapshot is to be loaded later on
|
||||
LoadConfiguration(loadImages);
|
||||
LogFileOutput("Main: LoadConfiguration()\n");
|
||||
}
|
||||
|
||||
if (g_cmdLine.model != A2TYPE_MAX)
|
||||
SetApple2Type(g_cmdLine.model);
|
||||
|
Loading…
x
Reference in New Issue
Block a user