| 374 | } |
| 375 | |
| 376 | static bool DoDiskInsert(const UINT slot, const int nDrive, LPCSTR szFileName) |
| 377 | { |
| 378 | Disk2InterfaceCard& card = dynamic_cast<Disk2InterfaceCard&>(GetCardMgr().GetRef(slot)); |
| 379 | |
| 380 | if (szFileName[0] == '\0') |
| 381 | { |
| 382 | card.EjectDisk(nDrive); |
| 383 | return true; |
| 384 | } |
| 385 | |
| 386 | std::string strPathName = GetFullPath(szFileName); |
| 387 | if (strPathName.empty()) return false; |
| 388 | |
| 389 | ImageError_e Error = card.InsertDisk(nDrive, strPathName, IMAGE_USE_FILES_WRITE_PROTECT_STATUS, IMAGE_DONT_CREATE); |
| 390 | bool res = (Error == eIMAGE_ERROR_NONE); |
| 391 | if (res) |
| 392 | SetCurrentDir(strPathName); |
| 393 | return res; |
| 394 | } |
| 395 | |
| 396 | static bool DoHardDiskInsert(const UINT slot, const int nDrive, LPCSTR szFileName) |
| 397 | { |
no test coverage detected