mirror of
https://github.com/mpv-player/mpv
synced 2025-02-26 02:05:31 +00:00
workaround: force PF table setup in IsProcessorFeaturePresent
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5801 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
4fc0795223
commit
ce6e53b4c1
@ -784,12 +784,18 @@ static void* WINAPI expWaitForSingleObject(void* object, int duration)
|
||||
return (void *)ret;
|
||||
}
|
||||
|
||||
static int pf_set = 0;
|
||||
static BYTE PF[64] = {0,};
|
||||
|
||||
static WIN_BOOL WINAPI expIsProcessorFeaturePresent(DWORD v)
|
||||
{
|
||||
WIN_BOOL result;
|
||||
if(v>63)result=0;
|
||||
if (!pf_set)
|
||||
{
|
||||
SYSTEM_INFO si;
|
||||
expGetSystemInfo(&si);
|
||||
}
|
||||
else result=PF[v];
|
||||
dbgprintf("IsProcessorFeaturePresent(0x%x) => 0x%x\n", v, result);
|
||||
return result;
|
||||
@ -823,6 +829,7 @@ static void WINAPI expGetSystemInfo(SYSTEM_INFO* si)
|
||||
return;
|
||||
}
|
||||
memset(PF,0,sizeof(PF));
|
||||
pf_set = 1;
|
||||
|
||||
cachedsi.u.s.wProcessorArchitecture = PROCESSOR_ARCHITECTURE_INTEL;
|
||||
cachedsi.dwPageSize = getpagesize();
|
||||
|
Loading…
Reference in New Issue
Block a user