[Mplayer-cvslog] CVS: main/libvo vo_svga.c,1.38,1.39
Arpi of Ize
arpi at mplayer.dev.hu
Sun Nov 18 20:48:01 CET 2001
Update of /cvsroot/mplayer/main/libvo
In directory mplayer:/var/tmp.root/cvs-serv26203
Modified Files:
vo_svga.c
Log Message:
mode selection (subdev) fix by Matan Ziv-Av matan at svgalib.org
Index: vo_svga.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_svga.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- vo_svga.c 6 Nov 2001 11:21:08 -0000 1.38
+++ vo_svga.c 18 Nov 2001 19:47:58 -0000 1.39
@@ -285,14 +285,48 @@
list = list->next;
}
+ if(vo_subdevice) {
+ int vm;
+ vm=vga_getmodenumber(vo_subdevice);
+ list=modelist;
+ while(list) {
+ if(list->modenum == vm) {
+ buf_w = list->modeinfo.width;
+ buf_h = list->modeinfo.height;
+ res_widescr = (((buf_w*1.0)/buf_h) > (4.0/3)) ? 1 : 0;
+ switch(list->modeinfo.colors) {
+ case 32768:
+ bpp=16;
+ bpp_conv=1;
+ break;
+ case 65536:
+ bpp=16;
+ bpp_conv=0;
+ break;
+ case (1<<24):
+ if(list->modeinfo.bytesperpixel == 3) {
+ bpp=32;
+ bpp_conv=1;
+ } else {
+ bpp=32;
+ bpp_conv=0;
+ }
+ break;
+ }
+ vid_mode=vm;
+ list=NULL;
+ } else list=list->next;
+ }
+ }
+
if (verbose)
printf("vo_svga: vid_mode: %d\n",vid_mode);
- vga_setlinearaddressing();
if (vga_setmode(vid_mode) == -1) {
printf("vo_svga: vga_setmode(%d) failed.\n",vid_mode);
uninit();
return(1); // error
}
+ vga_setlinearaddressing();
if (gl_setcontextvga(vid_mode)) {
printf("vo_svga: gl_setcontextvga(%d) failed.\n",vid_mode);
uninit();
More information about the MPlayer-cvslog
mailing list