# HG changeset patch # User reimar # Date 1128263202 0 # Node ID bdc49c9c419efa06281341ca2bce49026fe26fb8 # Parent 0af14c5fee82d84cd3207bdfd23c35b899ce6d3b 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 diff -r 0af14c5fee82 -r bdc49c9c419e loader/win32.c --- a/loader/win32.c Sat Oct 01 17:58:37 2005 +0000 +++ b/loader/win32.c Sun Oct 02 14:26:42 2005 +0000 @@ -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@YAXPAX@Z", -1, expdelete}, {"??2@YAPAXI@Z", -1, expnew}, {"_adjust_fdiv", -1, (void*)&_adjust_fdiv}, + {"_winver",-1,(void*)&_winver}, FF(strrchr, -1) FF(strchr, -1) FF(strlen, -1) diff -r 0af14c5fee82 -r bdc49c9c419e loader/wine/winnt.h --- a/loader/wine/winnt.h Sat Oct 01 17:58:37 2005 +0000 +++ b/loader/wine/winnt.h Sun Oct 02 14:26:42 2005 +0000 @@ -136,6 +136,7 @@ #define PF_XMMI_INSTRUCTIONS_AVAILABLE 6 #define PF_AMD3D_INSTRUCTIONS_AVAILABLE 7 #define PF_RDTSC_INSTRUCTION_AVAILABLE 8 +#define PF_XMMI64_INSTRUCTIONS_AVAILABLE 10 /* The Win32 register context */