mirror of https://github.com/arendst/Tasmota.git
commit
0f1193a991
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include <renderer.h>
|
||||
#include "lvgl.h"
|
||||
#include "tasmota_lvgl_assets.h" // force compilation of assets
|
||||
|
||||
#define XDRV_54 54
|
||||
|
||||
|
@ -139,6 +140,10 @@ void lv_flush_callback(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *c
|
|||
// save pixels to file
|
||||
int32_t btw = (width * height * LV_COLOR_DEPTH + 7) / 8;
|
||||
while (btw > 0) {
|
||||
#if (LV_COLOR_DEPTH == 16) && (LV_COLOR_16_SWAP == 1)
|
||||
uint16_t * pix = (uint16_t*) color_p;
|
||||
for (uint32_t i = 0; i < btw / 2; i++) (pix[i] = pix[i] << 8 | pix[i] >> 8);
|
||||
#endif
|
||||
int32_t ret = glue->getScreenshotFile()->write((const uint8_t*) color_p, btw);
|
||||
if (ret >= 0) {
|
||||
btw -= ret;
|
||||
|
|
Loading…
Reference in New Issue