From 06ffa28a7a7b66b3834bb1129e297dcba69089ad Mon Sep 17 00:00:00 2001 From: tomcw Date: Tue, 16 Apr 2019 21:11:47 +0100 Subject: [PATCH] Fix for inserting a disk into an empty but spinning driver. (Fixes #640) --- source/Disk.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/source/Disk.cpp b/source/Disk.cpp index d28eed94..ac656c20 100644 --- a/source/Disk.cpp +++ b/source/Disk.cpp @@ -541,15 +541,9 @@ ImageError_e Disk2InterfaceCard::InsertDisk(const int drive, LPCTSTR pszImageFil if (pFloppy->m_imagehandle) RemoveDisk(drive); - // Reset the drive's struct, but preserve the physical attributes (bug#18242: Platoon) - // . Changing the disk (in the drive) doesn't affect the drive's head etc. - { - int track = pDrive->m_track; - int phase = pDrive->m_phase; - pDrive->clear(); - pDrive->m_track = track; - pDrive->m_phase = phase; - } + // Reset the disk's attributes, but preserve the drive's attributes (GH#138/Platoon, GH#640) + // . Changing the disk (in the drive) doesn't affect the drive's attributes. + pDrive->m_disk.clear(); const DWORD dwAttributes = GetFileAttributes(pszImageFilename); if(dwAttributes == INVALID_FILE_ATTRIBUTES)