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

Function DoHardDiskInsert

source/Utilities.cpp:396–414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

394}
395
396static bool DoHardDiskInsert(const UINT slot, const int nDrive, LPCSTR szFileName)
397{
398 HarddiskInterfaceCard& card = dynamic_cast<HarddiskInterfaceCard&>(GetCardMgr().GetRef(slot));
399
400 if (szFileName[0] == '\0')
401 {
402 card.Unplug(nDrive);
403 return true;
404 }
405
406 std::string strPathName = GetFullPath(szFileName);
407 if (strPathName.empty()) return false;
408
409 BOOL bRes = card.Insert(nDrive, strPathName);
410 bool res = (bRes == TRUE);
411 if (res)
412 SetCurrentDir(strPathName);
413 return res;
414}
415
416void InsertFloppyDisks(const UINT slot, LPCSTR szImageName_drive[NUM_DRIVES], bool driveConnected[NUM_DRIVES], bool& bBoot)
417{

Callers 1

InsertHardDisksFunction · 0.85

Calls 4

GetFullPathFunction · 0.85
SetCurrentDirFunction · 0.85
UnplugMethod · 0.80
InsertMethod · 0.45

Tested by

no test coverage detected