From 1fd6bcb1f0daff3878d4657a4031a6b4c5746daa Mon Sep 17 00:00:00 2001 From: George Wright Date: Wed, 24 Jun 2026 21:15:38 -0700 Subject: [PATCH] pdascreenwindow: support colour as well as greyscale displays --- WindQt/pdascreenwindow.cpp | 9 +++++++-- WindQt/pdascreenwindow.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/WindQt/pdascreenwindow.cpp b/WindQt/pdascreenwindow.cpp index 0eae0ae..7207c86 100644 --- a/WindQt/pdascreenwindow.cpp +++ b/WindQt/pdascreenwindow.cpp @@ -52,12 +52,17 @@ PDAScreenWindow::PDAScreenWindow(EmuBase* emu, QWidget* parent) (new QLabel("Extras", this)) ->setGeometry(barX + barW * 7, barY, barW, barH); } + + if (strcmp(who, "Series 7") == 0) { + mFormat = QImage::Format_RGB444; + } else { + mFormat = QImage::Format_Grayscale8; + } } void PDAScreenWindow::updateScreen() { uint8_t* lines[1024]; - QImage img(emu->getLCDWidth(), emu->getLCDHeight(), - QImage::Format_Grayscale8); + QImage img(emu->getLCDWidth(), emu->getLCDHeight(), mFormat); for (int y = 0; y < img.height(); y++) lines[y] = img.scanLine(y); emu->readLCDIntoBuffer(lines, false); diff --git a/WindQt/pdascreenwindow.h b/WindQt/pdascreenwindow.h index 74a6db6..c10ac43 100644 --- a/WindQt/pdascreenwindow.h +++ b/WindQt/pdascreenwindow.h @@ -10,6 +10,7 @@ class PDAScreenWindow : public QWidget { private: EmuBase* emu; QLabel* lcd; + QImage::Format mFormat; public: explicit PDAScreenWindow(EmuBase* emu, QWidget* parent = nullptr); -- 2.45.2