OpenWrt packages
Sign in or create your account | Project List | Help
OpenWrt packages Git Source Tree
Root/
Source at commit 1b3135c created 12 years 5 months ago. By Xiangfu Liu, new package: SDL-widgets: a GUI toolkit on top of the SDL libraries | |
---|---|
1 | Index: svgalib-1.4.3/src/fbdev.c |
2 | =================================================================== |
3 | --- svgalib-1.4.3.orig/src/fbdev.c 2011-02-09 21:45:00.000000000 +0100 |
4 | +++ svgalib-1.4.3/src/fbdev.c 2011-02-09 21:46:42.000000000 +0100 |
5 | @@ -273,11 +273,13 @@ |
6 | { |
7 | struct fb_var_screeninfo info; |
8 | unsigned g; |
9 | + int bpp; |
10 | |
11 | if (fbdev_screeninfo(&info, mode)) |
12 | return 0; |
13 | |
14 | g = info.green.length; |
15 | + bpp = info.bits_per_pixel; |
16 | |
17 | info.activate = FB_ACTIVATE_TEST; |
18 | if (ioctl(fbdev_fd, FBIOPUT_VSCREENINFO, &info)) |
19 | @@ -287,6 +289,10 @@ |
20 | info.green.length != g) |
21 | return 0; |
22 | |
23 | + /* sometimes sets 32-bit modes when 24-bit is requested */ |
24 | + if (info.bits_per_pixel != bpp) |
25 | + return 0; |
26 | + |
27 | /* We may need to add more checks here. */ |
28 | |
29 | return SVGADRV; |
30 |