[Mplayer-cvslog] CVS: main/linux vbelib.c,1.16,1.17

Nick Kurshev nick at mplayer.dev.hu
Thu Nov 15 17:44:50 CET 2001


Update of /cvsroot/mplayer/main/linux
In directory mplayer:/var/tmp.root/cvs-serv16358/main/linux

Modified Files:
	vbelib.c 
Log Message:
Fixed iopl ports detection

Index: vbelib.c
===================================================================
RCS file: /cvsroot/mplayer/main/linux/vbelib.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- vbelib.c	4 Nov 2001 18:06:31 -0000	1.16
+++ vbelib.c	15 Nov 2001 16:44:43 -0000	1.17
@@ -110,6 +110,7 @@
    retval = vbeGetProtModeInfo(&vbe_pm_info);
    if(retval != VBE_OK) return retval;
    i = 0;
+   if(vbe_pm_info.iopl_ports) /* Can be NULL !!!*/
    while((iopl_port=vbe_pm_info.iopl_ports[i]) != 0xFFFF
 	 && vbe_pm_info.iopl_ports[i++] > 1023) ioperm(iopl_port,1,1);
    iopl(3);
@@ -624,10 +625,12 @@
     if(verbose > 1) printf("vbelib:  SetPaletteData=%04X:%04X => %p\n",r.es,info_offset+rm_info->SetPaletteData,pm_info->SetPaletteData);
 #endif
     pm_info->iopl_ports      = PhysToVirtSO(r.es,info_offset+rm_info->iopl_ports);
+    if(!rm_info->iopl_ports) pm_info->iopl_ports = NULL;
+    else
     if(!check_wrd(pm_info->iopl_ports))
     {
 	pm_info->iopl_ports = NULL;
-	retval = VBE_BROKEN_BIOS;
+/*	retval = VBE_BROKEN_BIOS; <- It's for broken BIOSes only */
     }   
 #ifdef HAVE_VERBOSE_VAR
     if(verbose > 1)




More information about the MPlayer-cvslog mailing list