Skip to content

Commit 82f419e

Browse files
committed
read msvc cpuid docs
1 parent 0c86e06 commit 82f419e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Source/System/RTEError.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -428,10 +428,10 @@ void RTEError::DumpHardwareInfo() {
428428
"GL Vendor: " + glVendor + "\n" +
429429
"GL Renderer: " + glRenderer + "\n";
430430

431-
unsigned int vendorRegs[4] = {0};
432431
#if defined(_MSC_VER) || defined(__linux__)
432+
int vendorRegs[4] = {0};
433433
#ifdef _MSC_VER
434-
__cpuid(reinterpret_cast<int*>(vendorRegs), 0);
434+
__cpuid(vendorRegs, 0);
435435
#else
436436
__cpuid(0, vendorRegs[0], vendorRegs[1], vendorRegs[2], vendorRegs[3]);
437437
#endif
@@ -443,9 +443,9 @@ void RTEError::DumpHardwareInfo() {
443443
hwInfo += "CPU Manufacturer ID: " + cpuVendor + "\n";
444444

445445
std::string cpuModel;
446-
unsigned int modelRegs[12];
446+
int modelRegs[12];
447447
#ifdef _MSC_VER
448-
__cpuid(reinterpret_cast<int*>(modelRegs), 0x80000000);
448+
__cpuid(modelRegs, 0x80000000);
449449
#else
450450
__cpuid(0x80000000, modelRegs[0], modelRegs[1], modelRegs[2], modelRegs[3]);
451451
#endif

0 commit comments

Comments
 (0)