From f27db49bd9d82a71325acab2dbc8b04a17483754 Mon Sep 17 00:00:00 2001 From: tomcw Date: Wed, 5 May 2021 21:34:22 +0100 Subject: [PATCH] WIP: Nick's patch for .po and .hdv smaller than 800K --- source/DiskImage.cpp | 4 ++++ source/Windows/WinFrame.cpp | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/source/DiskImage.cpp b/source/DiskImage.cpp index 4ccc160c..ff25f5c1 100644 --- a/source/DiskImage.cpp +++ b/source/DiskImage.cpp @@ -68,7 +68,11 @@ ImageError_e ImageOpen( const std::string & pszImageFilename, if (pImageInfo->pImageType && pImageInfo->pImageType->GetType() == eImageHDV) { if (bExpectFloppy) + { Err = eIMAGE_ERROR_UNSUPPORTED_HDV; + ImageClose(*ppImageInfo); + *ppImageInfo = NULL; + } return Err; } diff --git a/source/Windows/WinFrame.cpp b/source/Windows/WinFrame.cpp index 6fe59df7..ebdaf8d7 100644 --- a/source/Windows/WinFrame.cpp +++ b/source/Windows/WinFrame.cpp @@ -1078,6 +1078,14 @@ LRESULT Win32Frame::WndProc( ProcessButtonClick(BTN_RUN); } } + else if (Error == eIMAGE_ERROR_UNSUPPORTED_HDV) + { + if (HD_CardIsEnabled() && DoHardDiskInsert(HARDDISK_1, filename)) + { + SetForegroundWindow(window); + ProcessButtonClick(BTN_RUN); + } + } else { disk2Card.NotifyInvalidImage(iDrive, filename, Error);