mirror of https://github.com/mpv-player/mpv
amd fix
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2281 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
08e3fe558c
commit
f8ce675a2f
|
@ -91,7 +91,8 @@ void GetCpuCaps( CpuCaps *caps)
|
||||||
return;*/
|
return;*/
|
||||||
do_cpuid(0x00000000, regs);
|
do_cpuid(0x00000000, regs);
|
||||||
printf("CPU vendor name: %.4s%.4s%.4s\n",®s[1],®s[3],®s[2]);
|
printf("CPU vendor name: %.4s%.4s%.4s\n",®s[1],®s[3],®s[2]);
|
||||||
if (regs[0]>0x00000001) {
|
// if (regs[0]>0x00000001)
|
||||||
|
{
|
||||||
do_cpuid(0x00000001, regs2);
|
do_cpuid(0x00000001, regs2);
|
||||||
printf("CPU family: %d\n",(regs2[0] >> 8)&0xf);
|
printf("CPU family: %d\n",(regs2[0] >> 8)&0xf);
|
||||||
switch ((regs2[0] >> 8)&0xf) {
|
switch ((regs2[0] >> 8)&0xf) {
|
||||||
|
@ -105,7 +106,7 @@ void GetCpuCaps( CpuCaps *caps)
|
||||||
caps->cpuType=CPUTYPE_I586;
|
caps->cpuType=CPUTYPE_I586;
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
caps->cpuType=CPUTYPE_I586;
|
caps->cpuType=CPUTYPE_I686;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
printf("Unknown cpu type, default to i386\n");
|
printf("Unknown cpu type, default to i386\n");
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#define CPUTYPE_I386 0
|
#define CPUTYPE_I386 0
|
||||||
#define CPUTYPE_I486 1
|
#define CPUTYPE_I486 1
|
||||||
#define CPUTYPE_I586 2
|
#define CPUTYPE_I586 2
|
||||||
|
#define CPUTYPE_I686 3
|
||||||
|
|
||||||
typedef struct cpucaps_s {
|
typedef struct cpucaps_s {
|
||||||
int cpuType;
|
int cpuType;
|
||||||
|
|
Loading…
Reference in New Issue