[Mplayer-cvslog] CVS: main/libvo vo_fbdev.c,1.15,1.16
Szabolcs Berecz
szabii at users.sourceforge.net
Wed Apr 11 23:36:04 CEST 2001
Update of /cvsroot/mplayer/main/libvo
In directory usw-pr-cvs1:/tmp/cvs-serv19512
Modified Files:
vo_fbdev.c
Log Message:
-fbdepth added
Index: vo_fbdev.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_fbdev.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** vo_fbdev.c 2001/04/11 20:52:56 1.15
--- vo_fbdev.c 2001/04/11 21:36:02 1.16
***************
*** 357,360 ****
--- 357,361 ----
char *fb_mode_cfgfile = "/etc/fb.modes";
char *fb_mode_name = NULL;
+ int fb_mode_depth = 0;
static fb_mode_t *fb_mode = NULL;
static int fb_switch_mode = 0;
***************
*** 451,454 ****
--- 452,463 ----
}
fb_switch_mode = 1;
+ } else if (fb_mode_depth) {
+ printf("fb_init: Do _not_ use the 'fbdepth' parameter! "
+ "this parameter will be removed\n");
+ if (fb_mode_depth != 15 || fb_mode_depth != 16 ||
+ fb_mode_depth != 24 || fb_mode_depth != 32) {
+ printf("fb_init: can't switch to %d bpp\n", fb_mode_depth);
+ return 1;
+ }
}
***************
*** 516,519 ****
--- 525,563 ----
fb_vinfo.sync = fb_mode->sync;
fb_vinfo.vmode = fb_mode->vmode;
+ } else if (fb_mode_depth) {
+ fb_vinfo.bits_per_pixel = fb_mode_depth;
+ switch (fb_mode_depth) {
+ case 32:
+ case 24:
+ fb_vinfo.red.offset = 16;
+ fb_vinfo.red.length = 8;
+ fb_vinfo.red.msb_right = 0;
+ fb_vinfo.green.offset = 8;
+ fb_vinfo.green.length = 8;
+ fb_vinfo.green.msb_right = 0;
+ fb_vinfo.blue.offset = 0;
+ fb_vinfo.blue.length = 8;
+ fb_vinfo.blue.msb_right = 0;
+ case 16:
+ fb_vinfo.red.offset = 11;
+ fb_vinfo.red.length = 5;
+ fb_vinfo.red.msb_right = 0;
+ fb_vinfo.green.offset = 5;
+ fb_vinfo.green.length = 6;
+ fb_vinfo.green.msb_right = 0;
+ fb_vinfo.blue.offset = 0;
+ fb_vinfo.blue.length = 5;
+ fb_vinfo.blue.msb_right = 0;
+ case 15:
+ fb_vinfo.red.offset = 10;
+ fb_vinfo.red.length = 5;
+ fb_vinfo.red.msb_right = 0;
+ fb_vinfo.green.offset = 5;
+ fb_vinfo.green.length = 5;
+ fb_vinfo.green.msb_right = 0;
+ fb_vinfo.blue.offset = 0;
+ fb_vinfo.blue.length = 5;
+ fb_vinfo.blue.msb_right = 0;
+ }
}
fb_vinfo.xres_virtual = fb_vinfo.xres;
_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog
More information about the MPlayer-cvslog
mailing list