diff options
| author | Andreas Oberritter <obi@opendreambox.org> | 2008-10-02 14:02:41 +0000 |
|---|---|---|
| committer | Andreas Oberritter <obi@opendreambox.org> | 2008-10-02 14:02:41 +0000 |
| commit | 471b217e32f45b8ca085593f8f93735883e2be2a (patch) | |
| tree | 2ea835695a56e18bec8127d5afcf46ad3aa9bdb1 /lib/gdi | |
| parent | ab26adc86e6198e65e20d6bf707a6011208111ce (diff) | |
| download | enigma2-471b217e32f45b8ca085593f8f93735883e2be2a.tar.gz enigma2-471b217e32f45b8ca085593f8f93735883e2be2a.zip | |
properly request a video mode with an alpha channel
Diffstat (limited to 'lib/gdi')
| -rw-r--r-- | lib/gdi/fb.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/lib/gdi/fb.cpp b/lib/gdi/fb.cpp index 8e8221c3..bb6041e0 100644 --- a/lib/gdi/fb.cpp +++ b/lib/gdi/fb.cpp @@ -102,7 +102,32 @@ int fbClass::SetMode(unsigned int nxRes, unsigned int nyRes, unsigned int nbpp) screeninfo.width=0; screeninfo.xoffset=screeninfo.yoffset=0; screeninfo.bits_per_pixel=nbpp; - + + switch (nbpp) { + case 16: + // ARGB 1555 + screeninfo.transp.offset = 15; + screeninfo.transp.length = 1; + screeninfo.red.offset = 10; + screeninfo.red.length = 5; + screeninfo.green.offset = 5; + screeninfo.green.length = 5; + screeninfo.blue.offset = 0; + screeninfo.blue.length = 5; + break; + case 32: + // ARGB 8888 + screeninfo.transp.offset = 24; + screeninfo.transp.length = 8; + screeninfo.red.offset = 16; + screeninfo.red.length = 8; + screeninfo.green.offset = 8; + screeninfo.green.length = 8; + screeninfo.blue.offset = 0; + screeninfo.blue.length = 8; + break; + } + if (ioctl(fd, FBIOPUT_VSCREENINFO, &screeninfo)<0) { // try single buffering |
