fix(nv14): fix QT simulator display

This commit is contained in:
Raphael Coeffic
2022-06-12 18:30:42 +02:00
parent f80cd8cacc
commit 7e50b2f948
3 changed files with 12 additions and 10 deletions
@@ -21,9 +21,8 @@
#include "lcdwidget.h"
void LcdWidget::setData(unsigned char *buf, int width, int height, int depth)
void LcdWidget::setData(int width, int height, int depth)
{
lcdBuf = buf;
lcdWidth = width;
lcdHeight = height;
lcdDepth = depth;
@@ -65,11 +64,11 @@ void LcdWidget::makeScreenshot(const QString &fileName)
}
}
void LcdWidget::onLcdChanged(bool light)
void LcdWidget::onLcdChanged(uint8_t* lcdBuf, bool light)
{
QMutexLocker locker(&lcdMtx);
lightEnable = light;
memcpy(localBuf, lcdBuf, lcdSize);
if (lcdBuf) memcpy(localBuf, lcdBuf, lcdSize);
if (!redrawTimer.isValid() ||
redrawTimer.hasExpired(LCD_WIDGET_REFRESH_PERIOD)) {
update();