diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2005-08-31 14:19:02 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2005-08-31 14:19:02 +0000 |
| commit | 9bc92cbd0be7b1973960e88808feaca26a00aecd (patch) | |
| tree | f130433372ad4bb83c60b1bcfaba63e4f311dd28 /lib/gdi/fb.cpp | |
| parent | c692d6151aa59eb1823e131c6f97e51659c87ee8 (diff) | |
| download | enigma2-9bc92cbd0be7b1973960e88808feaca26a00aecd.tar.gz enigma2-9bc92cbd0be7b1973960e88808feaca26a00aecd.zip | |
- fix when not enough framebuffer memory available
Diffstat (limited to 'lib/gdi/fb.cpp')
| -rw-r--r-- | lib/gdi/fb.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/lib/gdi/fb.cpp b/lib/gdi/fb.cpp index 4a801bfe..c8fd94be 100644 --- a/lib/gdi/fb.cpp +++ b/lib/gdi/fb.cpp @@ -94,12 +94,24 @@ 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; + if (ioctl(fd, FBIOPUT_VSCREENINFO, &screeninfo)<0) { - perror("FBIOPUT_VSCREENINFO"); - printf("fb failed\n"); - return -1; - } + // try single buffering + screeninfo.yres_virtual=screeninfo.yres=nyRes; + + if (ioctl(fd, FBIOPUT_VSCREENINFO, &screeninfo)<0) + { + perror("FBIOPUT_VSCREENINFO"); + printf("fb failed\n"); + return -1; + } + eDebug(" - double buffering not available."); + } else + eDebug(" - double buffering available!"); + + m_number_of_pages = screeninfo.yres_virtual / nyRes; + if ((screeninfo.xres!=nxRes) && (screeninfo.yres!=nyRes) && (screeninfo.bits_per_pixel!=nbpp)) { eDebug("SetMode failed: wanted: %dx%dx%d, got %dx%dx%d", |
