summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-01-09 11:32:18 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-01-09 11:32:18 +0000
commit74423218b77881a9fac419b1652109ab2457bae4 (patch)
tree8049f7173dbdbcf266f7f56dfbd4696c1b16eaa8 /libvo
parent52e2d23da6884de67df8ae41a75906ae7196094b (diff)
downloadmpv-74423218b77881a9fac419b1652109ab2457bae4.tar.bz2
mpv-74423218b77881a9fac419b1652109ab2457bae4.tar.xz
Fix fbdev2 to work with Intel framebuffer.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30249 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_fbdev2.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libvo/vo_fbdev2.c b/libvo/vo_fbdev2.c
index 3483e96456..55527a660c 100644
--- a/libvo/vo_fbdev2.c
+++ b/libvo/vo_fbdev2.c
@@ -319,13 +319,17 @@ static int query_format(uint32_t format)
set_bpp(&fb_vinfo, fb_target_bpp);
fb_vinfo.xres_virtual = fb_vinfo.xres;
fb_vinfo.yres_virtual = fb_vinfo.yres;
+ if (ioctl(fb_dev_fd, FBIOPUT_VSCREENINFO, &fb_vinfo))
+ // Needed for Intel framebuffer with 32 bpp
+ fb_vinfo.transp.length = fb_vinfo.transp.offset = 0;
if (ioctl(fb_dev_fd, FBIOPUT_VSCREENINFO, &fb_vinfo)) {
mp_msg(MSGT_VO, MSGL_ERR, "[fbdev2] Can't put VSCREENINFO: %s\n", strerror(errno));
return 0;
}
fb_pixel_size = fb_vinfo.bits_per_pixel / 8;
- fb_bpp = fb_vinfo.red.length + fb_vinfo.green.length +
- fb_vinfo.blue.length + fb_vinfo.transp.length;
+ fb_bpp = fb_vinfo.bits_per_pixel;
+ if (fb_bpp == 16)
+ fb_bpp = fb_vinfo.red.length + fb_vinfo.green.length + fb_vinfo.blue.length;
if (fb_bpp == fb_target_bpp)
return VFCAP_CSP_SUPPORTED|VFCAP_CSP_SUPPORTED_BY_HW|VFCAP_ACCEPT_STRIDE;
}