Now uses the external libopenui

This commit is contained in:
Bertrand Songis
2019-10-02 14:41:52 +02:00
parent 5b568cd40c
commit 3e2cb83991
250 changed files with 76326 additions and 11869 deletions
+2 -2
View File
@@ -80,7 +80,7 @@ const char * writeScreenshot()
#if defined(COLORLCD)
for (int y = LCD_H - 1; y >= 0; y--) {
for (int x = 0; x < LCD_W; x++) {
display_t pixel = *lcd->getPixelPtr(x, y);
pixel_t pixel = *lcd->getPixelPtr(x, y);
uint32_t dst = (0xFF << 24) + (GET_RED(pixel) << 16) + (GET_GREEN(pixel) << 8) + (GET_BLUE(pixel) << 0);
if (f_write(&bmpFile, &dst, sizeof(dst), &written) != FR_OK || written != sizeof(dst)) {
f_close(&bmpFile);
@@ -91,7 +91,7 @@ const char * writeScreenshot()
#else
for (int y=LCD_H-1; y>=0; y-=1) {
for (int x=0; x<8*((LCD_W+7)/8); x+=2) {
display_t byte = getPixel(x+1, y) + (getPixel(x, y) << 4);
pixel_t byte = getPixel(x+1, y) + (getPixel(x, y) << 4);
if (f_write(&bmpFile, &byte, 1, &written) != FR_OK || written != 1) {
f_close(&bmpFile);
return SDCARD_ERROR(result);