From 736f325e7fc010b11c82fdf45faccaa0b1b935c6 Mon Sep 17 00:00:00 2001 From: Jorj Bauer Date: Mon, 28 Dec 2020 16:44:43 -0500 Subject: [PATCH] normalizing SDL BIOS behavior against Teensy --- bios.cpp | 8 ++++---- sdl/sdl-display.cpp | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/bios.cpp b/bios.cpp index b38ef82..0f65b8b 100644 --- a/bios.cpp +++ b/bios.cpp @@ -126,12 +126,12 @@ void BIOS::DrawMenuBar() for (int i=0; idrawPixel(xpos+x, 0, 0xFFFF); - g_display->drawPixel(xpos+x, 16, 0xFFFF); + g_display->drawUIPixel(xpos+x, 0, 0xFFFF); + g_display->drawUIPixel(xpos+x, 16, 0xFFFF); } for (int y=0; y<=16; y++) { - g_display->drawPixel(xpos, y, 0xFFFF); - g_display->drawPixel(xpos + titleWidths[i] + 2*XPADDING, y, 0xFFFF); + g_display->drawUIPixel(xpos, y, 0xFFFF); + g_display->drawUIPixel(xpos + titleWidths[i] + 2*XPADDING, y, 0xFFFF); } xpos += XPADDING; diff --git a/sdl/sdl-display.cpp b/sdl/sdl-display.cpp index 2b0863a..caf80e5 100644 --- a/sdl/sdl-display.cpp +++ b/sdl/sdl-display.cpp @@ -206,9 +206,9 @@ void SDLDisplay::drawCharacter(uint8_t mode, uint16_t x, uint8_t y, char c) uint8_t ch = BiosFont[temp]; for (int8_t x_off = 0; x_off <= xsize; x_off++) { if (ch & (1 << (7-x_off))) { - drawPixel(x + x_off, y + y_off, onPixel); + drawUIPixel(x + x_off, y + y_off, onPixel); } else { - drawPixel(x + x_off, y + y_off, offPixel); + drawUIPixel(x + x_off, y + y_off, offPixel); } } temp++; @@ -223,6 +223,7 @@ void SDLDisplay::drawString(uint8_t mode, uint16_t x, uint8_t y, const char *str for (int8_t i=0; i= 320) break; // FIXME constant - and pre-scaling, b/c that's in drawCharacter } }