fix drive indicators on startup; fix overlay for 9341

This commit is contained in:
Jorj Bauer 2022-02-02 10:02:32 -05:00
parent 16d84320ba
commit 1b43f1182e
3 changed files with 9 additions and 5 deletions

View File

@ -6,9 +6,9 @@
AppleUI::AppleUI() AppleUI::AppleUI()
{ {
redrawFrame = false; redrawFrame = true;
redrawDriveLatches = false; redrawDriveLatches = true;
redrawDriveActivity = false; redrawDriveActivity = true;
driveInserted[0] = driveInserted[1] = 0; driveInserted[0] = driveInserted[1] = 0;
driveActivity[0] = driveActivity[1] = 0; driveActivity[0] = driveActivity[1] = 0;
} }

View File

@ -44,7 +44,7 @@ SDLDisplay::SDLDisplay()
{ {
memset(videoBuffer, 0, sizeof(videoBuffer)); memset(videoBuffer, 0, sizeof(videoBuffer));
driveIndicator[0] = driveIndicator[1] = false; driveIndicator[0] = driveIndicator[1] = true; // assume on so they will redraw the first time
shellImage = NULL; shellImage = NULL;
d1OpenImage = d1ClosedImage = d2OpenImage = d2ClosedImage = NULL; d1OpenImage = d1ClosedImage = d2OpenImage = d2ClosedImage = NULL;

View File

@ -45,7 +45,7 @@ const uint16_t loresPixelColors[16] = { 0x0000, // 0 black
TeensyDisplay::TeensyDisplay() TeensyDisplay::TeensyDisplay()
{ {
driveIndicator[0] = driveIndicator[1] = false; driveIndicator[0] = driveIndicator[1] = true; // assume on so they will redraw immediately the first time
shellImage = NULL; shellImage = NULL;
d1OpenImage = d1ClosedImage = d2OpenImage = d2ClosedImage = NULL; d1OpenImage = d1ClosedImage = d2OpenImage = d2ClosedImage = NULL;
@ -212,8 +212,12 @@ void TeensyDisplay::blit()
static uint32_t nextMessageTime = 0; static uint32_t nextMessageTime = 0;
if (millis() >= nextMessageTime) { if (millis() >= nextMessageTime) {
if (overlayMessage[0]) { if (overlayMessage[0]) {
if (use8875) {
/// FIXME This position needs updating for each display differently /// FIXME This position needs updating for each display differently
// drawString(M_SELECTDISABLED, 1, (RA8875_HEIGHT - 18)/2, overlayMessage); // FIXME this /2 is clunky b/c drawString winds up doubling // drawString(M_SELECTDISABLED, 1, (RA8875_HEIGHT - 18)/2, overlayMessage); // FIXME this /2 is clunky b/c drawString winds up doubling
} else {
drawString(M_SELECTDISABLED, 1, ILI9341_HEIGHT - (16+12), overlayMessage);
}
} }
nextMessageTime = millis() + 1000; nextMessageTime = millis() + 1000;
} }