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

This commit is contained in:
Stephen White 2018-06-12 19:07:05 +10:00
parent ee289159b6
commit 697b986649

View file

@ -37,10 +37,13 @@ void DiskCaddy::Empty()
int x; int x;
int y; int y;
int index; int index;
bool anyDirty = false;
for (index = 0; index < (int)disks.size(); ++index) for (index = 0; index < (int)disks.size(); ++index)
{ {
if (disks[index].IsDirty()) if (disks[index].IsDirty())
{ {
anyDirty = true;
if (screen) if (screen)
{ {
x = screen->ScaleX(screenPosXCaddySelections); x = screen->ScaleX(screenPosXCaddySelections);
@ -67,6 +70,9 @@ void DiskCaddy::Empty()
} }
disks[index].Close(); disks[index].Close();
} }
if (anyDirty)
{
if (screen) if (screen)
{ {
x = screen->ScaleX(screenPosXCaddySelections); x = screen->ScaleX(screenPosXCaddySelections);
@ -90,6 +96,7 @@ void DiskCaddy::Empty()
screenLCD->PrintText(false, x, y, buffer, RGBA(0xff, 0xff, 0xff, 0xff), red); screenLCD->PrintText(false, x, y, buffer, RGBA(0xff, 0xff, 0xff, 0xff), red);
screenLCD->SwapBuffers(); screenLCD->SwapBuffers();
} }
}
disks.clear(); disks.clear();
selectedIndex = 0; selectedIndex = 0;