From 249b15b02d2744a61d36a1a630fe80015f87bfec Mon Sep 17 00:00:00 2001 From: tomcw Date: Tue, 9 Apr 2019 19:29:58 +0100 Subject: [PATCH] Get rid of duplicate func --- source/Disk.cpp | 24 ++++++++++-------------- source/Disk.h | 1 - source/Frame.cpp | 2 +- source/Memory.cpp | 9 +++++++++ 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/source/Disk.cpp b/source/Disk.cpp index 611af8b7..87d43948 100644 --- a/source/Disk.cpp +++ b/source/Disk.cpp @@ -78,11 +78,6 @@ int DiskIIInterfaceCard::GetCurrentPhase(void) { return m_floppyDrive[m_currDri int DiskIIInterfaceCard::GetCurrentOffset(void) { return m_floppyDrive[m_currDrive].disk.byte; } int DiskIIInterfaceCard::GetTrack(const int drive) { return m_floppyDrive[drive].track; } -LPCTSTR DiskIIInterfaceCard::GetDiskPathFilename(const int drive) -{ - return m_floppyDrive[drive].disk.fullname; -} - LPCTSTR DiskIIInterfaceCard::GetCurrentState(void) { if (m_floppyDrive[m_currDrive].disk.imagehandle == NULL) @@ -487,13 +482,6 @@ void DiskIIInterfaceCard::EjectDisk(const int drive) //=========================================================================== -// Return the file or zip name -// . Used by Property Sheet Page (Disk) -LPCTSTR DiskIIInterfaceCard::GetFullName(const int drive) -{ - return m_floppyDrive[drive].disk.fullname; -} - // Return the filename // . Used by Drive Buttons' tooltips LPCTSTR DiskIIInterfaceCard::GetFullDiskFilename(const int drive) @@ -504,9 +492,11 @@ LPCTSTR DiskIIInterfaceCard::GetFullDiskFilename(const int drive) return GetFullName(drive); } -LPCTSTR DiskIIInterfaceCard::DiskGetFullPathName(const int drive) +// Return the file or zip name +// . Used by Property Sheet Page (Disk) +LPCTSTR DiskIIInterfaceCard::GetFullName(const int drive) { - return ImageGetPathname(m_floppyDrive[drive].disk.imagehandle); + return m_floppyDrive[drive].disk.fullname; } // Return the imagename @@ -515,6 +505,12 @@ LPCTSTR DiskIIInterfaceCard::GetBaseName(const int drive) { return m_floppyDrive[drive].disk.imagename; } + +LPCTSTR DiskIIInterfaceCard::DiskGetFullPathName(const int drive) +{ + return ImageGetPathname(m_floppyDrive[drive].disk.imagehandle); +} + //=========================================================================== void DiskIIInterfaceCard::GetLightStatus(Disk_Status_e *pDisk1Status, Disk_Status_e *pDisk2Status) diff --git a/source/Disk.h b/source/Disk.h index 54579dd8..c9e01536 100644 --- a/source/Disk.h +++ b/source/Disk.h @@ -113,7 +113,6 @@ public: void Boot(void); void FlushCurrentTrack(const int drive); - LPCTSTR GetDiskPathFilename(const int drive); LPCTSTR GetFullDiskFilename(const int drive); LPCTSTR GetFullName(const int drive); LPCTSTR GetBaseName(const int drive); diff --git a/source/Frame.cpp b/source/Frame.cpp index 86f5d030..5a0c1808 100644 --- a/source/Frame.cpp +++ b/source/Frame.cpp @@ -2057,7 +2057,7 @@ void ProcessDiskPopupMenu(HWND hwnd, POINT pt, const int iDrive) //TODO: A directory is open if an empty path to CiderPress is set. This has to be fixed. std::string filename1= "\""; - filename1.append( sg_DiskIICard.GetDiskPathFilename(iDrive) ); + filename1.append( sg_DiskIICard.GetFullName(iDrive) ); filename1.append("\""); std::string sFileNameEmpty = "\""; sFileNameEmpty.append("\""); diff --git a/source/Memory.cpp b/source/Memory.cpp index 406fadfd..fcd946cf 100644 --- a/source/Memory.cpp +++ b/source/Memory.cpp @@ -1692,6 +1692,15 @@ void MemInitializeIO(void) ConfigureSAM(pCxRomPeripheral, 5); // $C500 : Z80 card } +#if 0 // debug test + if (g_Slot5 == CT_EMPTY) + { + DiskIIInterfaceCard* pDiskIISlot5 = new DiskIIInterfaceCard; + pDiskIISlot5->Initialize(pCxRomPeripheral, 5); + pDiskIISlot5->InsertDisk(0, "C:\\Work\\Personal\\Images\\lady tut PRODOS (san inc pack).dsk", false, false); + } +#endif + sg_DiskIICard.Initialize(pCxRomPeripheral, 6); // $C600 : Disk][ card HD_Load_Rom(pCxRomPeripheral, 7); // $C700 : HDD f/w