]> localhost Git - WindEmu.git/commitdiff
pdascreenwindow: support colour as well as greyscale displays
authorGeorge Wright <gw@gwright.org.uk>
Thu, 25 Jun 2026 04:15:38 +0000 (21:15 -0700)
committerGeorge Wright <gw@gwright.org.uk>
Fri, 26 Jun 2026 03:45:24 +0000 (20:45 -0700)
WindQt/pdascreenwindow.cpp
WindQt/pdascreenwindow.h

index 0eae0ae284cb6abbedbbe92408e9c3401d38a2de..7207c865720d76dbf9962a35007c492f608c60ad 100644 (file)
@@ -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);
index 74a6db6759d4bd9c95424fb5ecdd5833640ac75a..c10ac43f607b9c47f426c202fd080465c39144fa 100644 (file)
@@ -10,6 +10,7 @@ class PDAScreenWindow : public QWidget {
 private:
   EmuBase* emu;
   QLabel* lcd;
+  QImage::Format mFormat;
 
 public:
   explicit PDAScreenWindow(EmuBase* emu, QWidget* parent = nullptr);