"Saving Complete" message is now displayed only if disk images were written back.
This commit is contained in:
parent
ee289159b6
commit
697b986649
1 changed files with 25 additions and 18 deletions
|
@ -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,28 +70,32 @@ void DiskCaddy::Empty()
|
||||||
}
|
}
|
||||||
disks[index].Close();
|
disks[index].Close();
|
||||||
}
|
}
|
||||||
if (screen)
|
|
||||||
|
if (anyDirty)
|
||||||
{
|
{
|
||||||
x = screen->ScaleX(screenPosXCaddySelections);
|
if (screen)
|
||||||
y = screen->ScaleY(screenPosYCaddySelections);
|
{
|
||||||
|
x = screen->ScaleX(screenPosXCaddySelections);
|
||||||
|
y = screen->ScaleY(screenPosYCaddySelections);
|
||||||
|
|
||||||
snprintf(buffer, 256, "Saving Complete \r\n");
|
snprintf(buffer, 256, "Saving Complete \r\n");
|
||||||
screen->PrintText(false, x, y, buffer, RGBA(0xff, 0xff, 0xff, 0xff), red);
|
screen->PrintText(false, x, y, buffer, RGBA(0xff, 0xff, 0xff, 0xff), red);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (screenLCD)
|
if (screenLCD)
|
||||||
{
|
{
|
||||||
RGBA BkColour = RGBA(0, 0, 0, 0xFF);
|
RGBA BkColour = RGBA(0, 0, 0, 0xFF);
|
||||||
screenLCD->Clear(BkColour);
|
screenLCD->Clear(BkColour);
|
||||||
x = 0;
|
x = 0;
|
||||||
y = 0;
|
y = 0;
|
||||||
|
|
||||||
snprintf(buffer, 256, "Saving");
|
snprintf(buffer, 256, "Saving");
|
||||||
screenLCD->PrintText(false, x, y, buffer, RGBA(0xff, 0xff, 0xff, 0xff), BkColour);
|
screenLCD->PrintText(false, x, y, buffer, RGBA(0xff, 0xff, 0xff, 0xff), BkColour);
|
||||||
y += 16;
|
y += 16;
|
||||||
snprintf(buffer, 256, "Complete ");
|
snprintf(buffer, 256, "Complete ");
|
||||||
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();
|
||||||
|
|
Loading…
Reference in a new issue