1
0
mirror of https://github.com/jscrane/r65emu.git synced 2024-12-30 09:30:46 +00:00
This commit is contained in:
Stephen Crane 2018-11-12 22:18:44 +00:00
parent 860e53a8f7
commit 7eddcc15ff

View File

@ -42,6 +42,7 @@ void TFTDisplay::begin(unsigned bg, unsigned fg, orientation_t orient) {
_dx = espi.width(); _dx = espi.width();
_dy = espi.height(); _dy = espi.height();
_cy = espi.fontHeight(); _cy = espi.fontHeight();
_cx = 6; // FIXME
#endif #endif
setColor(fg); setColor(fg);
@ -86,6 +87,9 @@ void TFTDisplay::drawString(const char *s, unsigned x, unsigned y) {
#if defined(USE_UTFT) #if defined(USE_UTFT)
utft.print(s, x, y); utft.print(s, x, y);
#elif defined(USE_ESPI) #elif defined(USE_ESPI)
espi.setTextDatum(TL_DATUM);
unsigned w = espi.textWidth(s);
espi.fillRect(x, y, w, _cy, _bg);
espi.drawString(s, x, y); espi.drawString(s, x, y);
#endif #endif
} }