1
0
mirror of https://github.com/jscrane/r65emu.git synced 2024-12-11 05:49:29 +00:00
This commit is contained in:
steve 2023-11-18 13:23:52 +00:00
parent 73964abe4b
commit b2519c5ff0
3 changed files with 11 additions and 11 deletions

View File

@ -179,7 +179,8 @@ void Display::drawLine(unsigned x1, unsigned y1, unsigned x2, unsigned y2, colou
#elif defined(USE_ESPI)
espi.drawLine(x1, y1, x2, y2, col);
#elif defined(USE_VGA)
canvas.drawLine(x1, y1, x2, y2, rgb(col));
canvas.setPenColor(rgb(col));
canvas.drawLine(x1, y1, x2, y2);
#endif
}
@ -192,7 +193,7 @@ void Display::drawCircle(unsigned x, unsigned y, unsigned r, colour_t col) {
#elif defined(USE_ESPI)
espi.drawCircle(x, y, r, col);
#elif defined(USE_VGA)
canvas.setBrushColor(col);
canvas.setBrushColor(rgb(col));
canvas.fillEllipse(x, y, r, r);
#endif
}
@ -206,7 +207,7 @@ void Display::fillCircle(unsigned x, unsigned y, unsigned r, colour_t col) {
#elif defined(USE_ESPI)
espi.fillCircle(x, y, r, col);
#elif defined(USE_VGA)
canvas.setPenColor(col);
canvas.setPenColor(rgb(col));
canvas.drawEllipse(x, y, r, r);
#endif
}
@ -220,7 +221,7 @@ void Display::drawRectangle(unsigned x, unsigned y, unsigned w, unsigned h, colo
#elif defined(USE_ESPI)
espi.drawRect(x, y, w, h, col);
#elif defined(USE_VGA)
canvas.setBrushColor(col);
canvas.setBrushColor(rgb(col));
canvas.fillRectangle(x, y, x+w, y+h);
#endif
}
@ -234,7 +235,7 @@ void Display::fillRectangle(unsigned x, unsigned y, unsigned w, unsigned h, colo
#elif defined(USE_ESPI)
espi.fillRect(x, y, w, h, col);
#elif defined(USE_VGA)
canvas.setPenColor(col);
canvas.setPenColor(rgb(col));
canvas.drawRectangle(x, y, x+w, y+h);
#endif
}
@ -247,15 +248,10 @@ void Display::drawString(const char *s, unsigned x, unsigned y, colour_t col) {
utft.print(s, x, y);
#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.setTextColor(col, _bg, true);
espi.drawString(s, x, y);
#elif defined(USE_VGA)
canvas.setPenColor(col);
canvas.setPenColor(rgb(col));
canvas.drawText(x, y, s);
#endif
}

View File

@ -12,7 +12,9 @@
#include "filer.h"
#include "flash_filer.h"
#if defined(USE_SPIFFS) || defined(USE_LITTLEFS)
static File files[MAX_FILES];
#endif
#if defined(USE_SPIFFS)
static File dir;

View File

@ -28,10 +28,12 @@
#define SPIRAM_SIZE 0x8000u
// flash storage
#if !defined(NO_STORAGE)
#undef USE_SD
//#define SD_CS D0
#undef USE_SPIFFS
#define USE_LITTLEFS
#endif
// sound
#define PWM_SOUND D2