changeset 14302:9929eafe6be5

win95 fix fix by Rune Petersen <rune.mail-list at mail.tele.dk>
author faust3
date Sun, 02 Jan 2005 16:44:44 +0000
parents efa291d270b7
children ef29ceb5add1
files libvo/vo_directx.c
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_directx.c	Sun Jan 02 16:39:03 2005 +0000
+++ b/libvo/vo_directx.c	Sun Jan 02 16:44:44 2005 +0000
@@ -380,13 +380,10 @@
             selected_guid_ptr = &selected_guid;
         }
         mi.cbSize = sizeof(mi);
-        if(myGetMonitorInfo){
+
         if (myGetMonitorInfo(hm, &mi)) {
 			monitor_rect = mi.rcMonitor;
         }
-        }else{
-            mp_msg(MSGT_VO, MSGL_ERR, "-adapter is not supported on Win95\n");
-        }
         mp_msg(MSGT_VO, MSGL_INFO ,"\t\t<--");
     }
     mp_msg(MSGT_VO, MSGL_INFO ,"\n");
@@ -405,7 +402,11 @@
 	HINSTANCE user32dll=LoadLibrary("user32.dll");
 	
 	if(user32dll){
-		myGetMonitorInfo=GetProcAddress(user32dll,"GetMonitorInfo");
+		myGetMonitorInfo=GetProcAddress(user32dll,"GetMonitorInfoA");
+		if(!myGetMonitorInfo && vo_adapter_num){
+			mp_msg(MSGT_VO, MSGL_ERR, "<vo_directx> -adapter is not supported on Win95\n");
+			vo_adapter_num = 0;
+		}
 	}
 	
 	mp_msg(MSGT_VO, MSGL_DBG3,"<vo_directx><INFO>Initing DirectDraw\n" );