From 86d3e031ac20ae699abb89b19fe7ffcc82fa803e Mon Sep 17 00:00:00 2001 From: bernd Date: Tue, 26 Jul 2011 05:23:19 +0200 Subject: [PATCH] Implemented backlight for simulat0r --- simulat0r/gui/qsimulat0r.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/simulat0r/gui/qsimulat0r.cc b/simulat0r/gui/qsimulat0r.cc index 0ef57e0..9cc36c5 100644 --- a/simulat0r/gui/qsimulat0r.cc +++ b/simulat0r/gui/qsimulat0r.cc @@ -19,6 +19,7 @@ using namespace std; extern "C" { #include "basic/basic.h" +#include "lcd/backlight.h" #define lcdGetPixel __hideaway_lcdGetPixel #include "lcd/display.h" @@ -86,7 +87,12 @@ public: painter.scale(1,1); QPoint pts[dimx*dimy]; - pixmap.fill(0); + // draw backlight + const int backlight=backlightGetBrightness()*255/100; + pixmap.setPixel(1,1,(QColor(backlight,backlight,backlight).rgb())); + pixmap.fill(pixmap.pixel(1,1)); + + // draw lcd array for (int x = 0; x < dimx; ++x) { for(int y=0; y