From 48eaa18163b17d470c0f150e7976e101e8d64bb4 Mon Sep 17 00:00:00 2001 From: penfold42 Date: Fri, 3 Aug 2018 22:55:32 +1000 Subject: [PATCH] re-init display at emulation exit --- src/DiskCaddy.cpp | 3 +-- src/main.cpp | 10 +++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/DiskCaddy.cpp b/src/DiskCaddy.cpp index 2f8f66e..04e6d4a 100644 --- a/src/DiskCaddy.cpp +++ b/src/DiskCaddy.cpp @@ -318,8 +318,7 @@ void DiskCaddy::ShowSelectedImage(u32 index) const char* name = image->GetName(); if (name) { -// snprintf(buffer, 256, " "); - memset(buffer, 'Z', screenLCD->Width()/screenLCD->GetFontWidth()); + memset(buffer, ' ', screenLCD->Width()/screenLCD->GetFontWidth()); screenLCD->PrintText(false, x, y, buffer, BkColour, BkColour); 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); diff --git a/src/main.cpp b/src/main.cpp index 44bd790..b62c026 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -690,9 +690,13 @@ void emulator() { IEC_Bus::VIA = 0; + IEC_Bus::Reset(); +// workaround for occasional oled curruption + if (screenLCD) + screenLCD->ClearInit(0); + roms.ResetCurrentROMIndex(); fileBrowser->ClearScreen(); - IEC_Bus::Reset(); fileBrowserSelectedName = 0; fileBrowser->ClearSelections(); @@ -948,6 +952,10 @@ void emulator() if (diskCaddy.Empty()) IEC_Bus::WaitMicroSeconds(2 * 1000000); +// workaround for occasional oled curruption +// if (screenLCD) +// screenLCD->ClearInit(0); + fileBrowser->ClearSelections(); fileBrowser->RefeshDisplay(); // Just redisplay the current folder.