| 756 | } |
| 757 | |
| 758 | void Disk2InterfaceCard::GetFilenameAndPathForSaveState(std::string& filename, std::string& path) |
| 759 | { |
| 760 | filename = ""; |
| 761 | path = ""; |
| 762 | |
| 763 | for (UINT i=DRIVE_1; i<=DRIVE_2; i++) |
| 764 | { |
| 765 | if (IsDriveEmpty(i)) |
| 766 | continue; |
| 767 | |
| 768 | filename = GetBaseName(i); |
| 769 | std::string pathname = DiskGetFullPathName(i); |
| 770 | |
| 771 | size_t idx = pathname.find_last_of(PATH_SEPARATOR); |
| 772 | if (idx >= 0 && idx+1 < (int)pathname.length()) // path exists? |
| 773 | { |
| 774 | path = pathname.substr(0, idx+1); |
| 775 | return; |
| 776 | } |
| 777 | |
| 778 | _ASSERT(0); |
| 779 | break; |
| 780 | } |
| 781 | } |
| 782 | |
| 783 | const std::string & Disk2InterfaceCard::DiskGetFullPathName(const int drive) |
| 784 | { |
no outgoing calls
no test coverage detected