[RecordTimer] fix repeat timer issue.
[vuplus_dvbapp] / lib / gdi / glcddc.cpp
1 #include <lib/gdi/glcddc.h>
2 #include <lib/gdi/lcd.h>
3 #include <lib/base/init.h>
4 #include <lib/base/init_num.h>
5
6 gLCDDC *gLCDDC::instance;
7
8 gLCDDC::gLCDDC()
9 {
10         lcd = new eDBoxLCD();
11         instance=this;
12         
13         update=1;
14
15         surface.x=lcd->size().width();
16         surface.y=lcd->size().height();
17         surface.stride=lcd->stride();
18         surface.bypp=surface.stride / surface.x;
19         surface.bpp=surface.bypp*8;
20         surface.data=lcd->buffer();
21         surface.clut.colors=0;
22         surface.clut.data=0;
23
24         m_pixmap = new gPixmap(&surface);
25 }
26
27 gLCDDC::~gLCDDC()
28 {
29         delete lcd;
30         instance=0;
31 }
32
33 void gLCDDC::exec(const gOpcode *o)
34 {
35         switch (o->opcode)
36         {
37         case gOpcode::flush:
38 //              if (update)
39 #ifndef BUILD_VUPLUS
40                         lcd->update();
41 #else
42                         ;
43 #endif
44         default:
45                 gDC::exec(o);
46                 break;
47         }
48 }
49
50 void gLCDDC::setUpdate(int u)
51 {
52         update=u;
53 }
54
55 eAutoInitPtr<gLCDDC> init_gLCDDC(eAutoInitNumbers::graphic-1, "gLCDDC");