| 309 | //=========================================================================== |
| 310 | |
| 311 | void 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 |
nothing calls this directly
no test coverage detected