[MPlayer-cvslog] CVS: main/loader win32.c,1.102,1.103

Reimar Döffinger CVS syncmail at mplayerhq.hu
Sun Oct 2 16:26:44 CEST 2005


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/loader
In directory mail:/var2/tmp/cvs-serv20388

Modified Files:
	win32.c 
Log Message:
Several minor fixes: Correctly advertise SSE and SSE2 instruction sets,
add MSVCRT._winver and KERNEL32.GetThreadPriority exports.
Should fix some crashes esp. with wmv9dmo.dll


Index: win32.c
===================================================================
RCS file: /cvsroot/mplayer/main/loader/win32.c,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -r1.102 -r1.103
--- win32.c	1 Sep 2005 20:42:13 -0000	1.102
+++ win32.c	2 Oct 2005 14:26:41 -0000	1.103
@@ -968,6 +968,8 @@
 	    PF[PF_MMX_INSTRUCTIONS_AVAILABLE] = TRUE;
 	if (gCpuCaps.hasSSE)
 	    PF[PF_XMMI_INSTRUCTIONS_AVAILABLE] = TRUE;
+	if (gCpuCaps.hasSSE2)
+	    PF[PF_XMMI64_INSTRUCTIONS_AVAILABLE] = TRUE;
 	if (gCpuCaps.has3DNow)
 	    PF[PF_AMD3D_INSTRUCTIONS_AVAILABLE] = TRUE;
 
@@ -1141,8 +1143,10 @@
 		    PF[PF_MMX_INSTRUCTIONS_AVAILABLE] = TRUE;
 		if (strstr(value,"tsc"))
 		    PF[PF_RDTSC_INSTRUCTION_AVAILABLE] = TRUE;
-		if (strstr(value,"xmm"))
+		if (strstr(value,"xmm") || strstr(value,"sse"))
 		    PF[PF_XMMI_INSTRUCTIONS_AVAILABLE] = TRUE;
+		if (strstr(value,"sse2"))
+		    PF[PF_XMMI64_INSTRUCTIONS_AVAILABLE] = TRUE;
 		if (strstr(value,"3dnow"))
 		    PF[PF_AMD3D_INSTRUCTIONS_AVAILABLE] = TRUE;
 	    }
@@ -3322,6 +3326,7 @@
 }
 
 static int _adjust_fdiv=0; //what's this? - used to adjust division
+static int _winver = 0x510; // windows version
 
 
 
@@ -4528,6 +4533,12 @@
         lpmem->dwAvailPageFile++;
 }
 
+static INT WINAPI expGetThreadPriority(HANDLE hthread)
+{
+    dbgprintf("GetThreadPriority(%p)\n",hthread);
+    return 0;
+}
+
 /**********************************************************************
  * SetThreadPriority [KERNEL32.@]  Sets priority for thread.
  *
@@ -4927,6 +4938,7 @@
     FF(SetThreadAffinityMask,-1)
     FF(GetCurrentProcessId,-1)
     FF(GlobalMemoryStatus,-1)
+    FF(GetThreadPriority,-1)
     FF(SetThreadPriority,-1)
     FF(ExitProcess,-1)
     {"LoadLibraryExA", -1, (void*)&LoadLibraryExA},
@@ -4942,6 +4954,7 @@
     {"??3 at YAXPAX@Z", -1, expdelete},
     {"??2 at YAPAXI@Z", -1, expnew},
     {"_adjust_fdiv", -1, (void*)&_adjust_fdiv},
+    {"_winver",-1,(void*)&_winver},
     FF(strrchr, -1)
     FF(strchr, -1)
     FF(strlen, -1)




More information about the MPlayer-cvslog mailing list