diff options
author | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-04-28 16:34:35 +0000 |
---|---|---|
committer | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-04-28 16:34:35 +0000 |
commit | 002372c7afd0faf4a11c1db74fb59bc120f9ecb4 (patch) | |
tree | af87c74300c70c10cf222b2d57a58a026ba9dbe7 | |
parent | 489e551f54e50c4f45aa60a9675774cd881f5163 (diff) | |
download | mpv-002372c7afd0faf4a11c1db74fb59bc120f9ecb4.tar.bz2 mpv-002372c7afd0faf4a11c1db74fb59bc120f9ecb4.tar.xz |
changed cpudetection code to support newer pentiums
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10014 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | loader/win32.c | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/loader/win32.c b/loader/win32.c index 6eafed675c..c3cda9a0c1 100644 --- a/loader/win32.c +++ b/loader/win32.c @@ -929,26 +929,23 @@ static void WINAPI expGetSystemInfo(SYSTEM_INFO* si) if (gCpuCaps.has3DNow) PF[PF_AMD3D_INSTRUCTIONS_AVAILABLE] = TRUE; - switch(gCpuCaps.cpuType) + if (gCpuCaps.cpuType == 4) { - case CPUTYPE_I686: - case CPUTYPE_I586: - cachedsi.dwProcessorType = PROCESSOR_INTEL_PENTIUM; - cachedsi.wProcessorLevel = 5; - break; - case CPUTYPE_I486: - cachedsi.dwProcessorType = PROCESSOR_INTEL_486; - cachedsi.wProcessorLevel = 4; - break; - case CPUTYPE_I386: - default: - cachedsi.dwProcessorType = PROCESSOR_INTEL_386; - cachedsi.wProcessorLevel = 3; - break; + cachedsi.dwProcessorType = PROCESSOR_INTEL_486; + cachedsi.wProcessorLevel = 4; + } + else if (gCpuCaps.cpuType > 5) + { + cachedsi.dwProcessorType = PROCESSOR_INTEL_PENTIUM; + cachedsi.wProcessorLevel = 5; + } + else + { + cachedsi.dwProcessorType = PROCESSOR_INTEL_386; + cachedsi.wProcessorLevel = 3; } cachedsi.wProcessorRevision = gCpuCaps.cpuStepping; cachedsi.dwNumberOfProcessors = 1; /* hardcoded */ - } #endif |