Fix MSVC cpu detection after last patch
This commit is contained in:
parent
178cee4ed9
commit
998de912ee
@ -253,16 +253,10 @@ char *gcpuid(char *_cpuname)
|
|||||||
unsigned char stepping; /* CPU stepping value, 4 bits */
|
unsigned char stepping; /* CPU stepping value, 4 bits */
|
||||||
// unsigned cpu_id; /* stepping ID, 12 bits: 0x0FMS */
|
// unsigned cpu_id; /* stepping ID, 12 bits: 0x0FMS */
|
||||||
// unsigned features; /* CPU features info */
|
// unsigned features; /* CPU features info */
|
||||||
}scpuid;
|
}scpuid; /* ISO C: static variabled is initialised with 0 */
|
||||||
|
|
||||||
// memset( &scpuid, 0, sizeof(scpuid) );
|
|
||||||
|
|
||||||
// TO_PORT_TAG: CPUID
|
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
|
#undef and // and is defined as &&, this is conflicted with assembler instruction "and"
|
||||||
scpuid.vendor[_MAX_VNAME_LEN] = 0;
|
|
||||||
|
|
||||||
#undef and
|
|
||||||
|
|
||||||
__asm
|
__asm
|
||||||
{
|
{
|
||||||
@ -432,7 +426,7 @@ char *gcpuid(char *_cpuname)
|
|||||||
"eax", "ebx", "ecx", "edx", "esp"
|
"eax", "ebx", "ecx", "edx", "esp"
|
||||||
);
|
);
|
||||||
|
|
||||||
cpuname(scpuid.family, scpuid.model, scpuid.vendor, _cpuname);
|
cpuname(scpuid.family?scpuid.family:scpuid.cpu, scpuid.model, scpuid.vendor, _cpuname);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#if defined(MSDOS) || defined(DOS) || defined(__MSDOS__) || defined(_DOS) \
|
#if defined(MSDOS) || defined(DOS) || defined(__MSDOS__) || defined(_DOS) \
|
||||||
|
Reference in New Issue
Block a user