Mercurial > mplayer.hg
changeset 5800:f2136a17b451
workaround: force PF table setup in IsProcessorFeaturePresent
author | alex |
---|---|
date | Tue, 23 Apr 2002 15:12:22 +0000 |
parents | b86b20b29439 |
children | 81fee5d61ddb |
files | loader/win32.c |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/loader/win32.c Tue Apr 23 14:48:03 2002 +0000 +++ b/loader/win32.c Tue Apr 23 15:12:22 2002 +0000 @@ -784,12 +784,18 @@ 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 @@ return; } memset(PF,0,sizeof(PF)); + pf_set = 1; cachedsi.u.s.wProcessorArchitecture = PROCESSOR_ARCHITECTURE_INTEL; cachedsi.dwPageSize = getpagesize();