MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / LoadLastDiskImage

Method LoadLastDiskImage

source/Harddisk.cpp:311–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309//===========================================================================
310
311void HarddiskInterfaceCard::LoadLastDiskImage(const int drive)
312{
313 _ASSERT(drive >= HARDDISK_1 && drive < NUM_HARDDISKS);
314
315 const std::string regKey = std::string(REGVALUE_LAST_HARDDISK_) + (char)('1' + drive);
316 char pathname[MAX_PATH];
317
318 std::string regSection = RegGetConfigSlotSection(m_slot);
319 if (RegLoadString(regSection.c_str(), regKey.c_str(), TRUE, pathname, MAX_PATH, "") && (pathname[0] != 0))
320 {
321 m_saveDiskImage = false;
322 bool res = Insert(drive, pathname);
323 m_saveDiskImage = true;
324
325 if (!res)
326 {
327 NotifyInvalidImage(pathname);
328 CleanupDrive(drive);
329 }
330 }
331}
332
333//===========================================================================
334

Callers

nothing calls this directly

Calls 2

RegGetConfigSlotSectionFunction · 0.85
RegLoadStringFunction · 0.85

Tested by

no test coverage detected