re-init display at emulation exit

This commit is contained in:
penfold42 2018-08-03 22:55:32 +10:00
parent 52a74a6f5c
commit 48eaa18163
2 changed files with 10 additions and 3 deletions

View file

@ -318,8 +318,7 @@ void DiskCaddy::ShowSelectedImage(u32 index)
const char* name = image->GetName(); const char* name = image->GetName();
if (name) if (name)
{ {
// snprintf(buffer, 256, " "); memset(buffer, ' ', screenLCD->Width()/screenLCD->GetFontWidth());
memset(buffer, 'Z', screenLCD->Width()/screenLCD->GetFontWidth());
screenLCD->PrintText(false, x, y, buffer, BkColour, BkColour); screenLCD->PrintText(false, x, y, buffer, BkColour, BkColour);
snprintf(buffer, 256, "%d %s", caddyIndex + 1, name); snprintf(buffer, 256, "%d %s", caddyIndex + 1, name);
screenLCD->PrintText(false, x, y, buffer, RGBA(0xff, 0xff, 0xff, 0xff), caddyIndex == index ? RGBA(0xff, 0xff, 0xff, 0xff) : BkColour); screenLCD->PrintText(false, x, y, buffer, RGBA(0xff, 0xff, 0xff, 0xff), caddyIndex == index ? RGBA(0xff, 0xff, 0xff, 0xff) : BkColour);

View file

@ -690,9 +690,13 @@ void emulator()
{ {
IEC_Bus::VIA = 0; IEC_Bus::VIA = 0;
IEC_Bus::Reset();
// workaround for occasional oled curruption
if (screenLCD)
screenLCD->ClearInit(0);
roms.ResetCurrentROMIndex(); roms.ResetCurrentROMIndex();
fileBrowser->ClearScreen(); fileBrowser->ClearScreen();
IEC_Bus::Reset();
fileBrowserSelectedName = 0; fileBrowserSelectedName = 0;
fileBrowser->ClearSelections(); fileBrowser->ClearSelections();
@ -948,6 +952,10 @@ void emulator()
if (diskCaddy.Empty()) if (diskCaddy.Empty())
IEC_Bus::WaitMicroSeconds(2 * 1000000); IEC_Bus::WaitMicroSeconds(2 * 1000000);
// workaround for occasional oled curruption
// if (screenLCD)
// screenLCD->ClearInit(0);
fileBrowser->ClearSelections(); fileBrowser->ClearSelections();
fileBrowser->RefeshDisplay(); // Just redisplay the current folder. fileBrowser->RefeshDisplay(); // Just redisplay the current folder.