Merge pull request #146 from Remboooo/remboooo/fix-oled-caddy

Fix OLED screen showing content from previous screen on empty lines in caddy view
This commit is contained in:
Stephen White 2019-09-22 11:15:41 +10:00 committed by GitHub
commit 7c5c812f61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -349,6 +349,11 @@ void DiskCaddy::ShowSelectedImage(u32 index)
if (y >= screenLCD->Height()) if (y >= screenLCD->Height())
break; break;
} }
while (y < screenLCD->Height()) {
memset(buffer, ' ', screenLCD->Width()/screenLCD->GetFontWidth());
screenLCD->PrintText(false, x, y, buffer, BkColour, BkColour);
y += screenLCD->GetFontHeight();
}
screenLCD->SwapBuffers(); screenLCD->SwapBuffers();
} }
} }