"Saving Complete" message is now displayed only if disk images were written back

This commit is contained in:
Stephen White 2018-06-12 19:17:00 +10:00
parent 697b986649
commit 99f385ecf3
3 changed files with 5 additions and 4 deletions

View File

@ -32,7 +32,7 @@ static char buffer[256] = { 0 };
static u32 white = RGBA(0xff, 0xff, 0xff, 0xff); static u32 white = RGBA(0xff, 0xff, 0xff, 0xff);
static u32 red = RGBA(0xff, 0, 0, 0xff); static u32 red = RGBA(0xff, 0, 0, 0xff);
void DiskCaddy::Empty() bool DiskCaddy::Empty()
{ {
int x; int x;
int y; int y;
@ -100,6 +100,7 @@ void DiskCaddy::Empty()
disks.clear(); disks.clear();
selectedIndex = 0; selectedIndex = 0;
return anyDirty;
} }
bool DiskCaddy::Insert(const FILINFO* fileInfo, bool readOnly) bool DiskCaddy::Insert(const FILINFO* fileInfo, bool readOnly)

View File

@ -35,7 +35,7 @@ public:
void SetScreen(Screen* screen, ScreenBase* screenLCD) { this->screen = screen; this->screenLCD = screenLCD; } void SetScreen(Screen* screen, ScreenBase* screenLCD) { this->screen = screen; this->screenLCD = screenLCD; }
void Empty(); bool Empty();
bool Insert(const FILINFO* fileInfo, bool readOnly); bool Insert(const FILINFO* fileInfo, bool readOnly);

View File

@ -867,7 +867,7 @@ void emulator()
// - will write back all changed/dirty/written to disk images now // - will write back all changed/dirty/written to disk images now
// - TDOO: need to display the image names as they write back // - TDOO: need to display the image names as they write back
// - pass in a call back function? // - pass in a call back function?
diskCaddy.Empty(); if (diskCaddy.Empty())
IEC_Bus::WaitMicroSeconds(2 * 1000000); IEC_Bus::WaitMicroSeconds(2 * 1000000);
fileBrowser->ClearSelections(); fileBrowser->ClearSelections();