| 32 | extern void PlatformBlitInit(); |
| 33 | |
| 34 | static void getBrand(char* brand) |
| 35 | { |
| 36 | S32 extendedInfo[4]; |
| 37 | __cpuid(extendedInfo, 0x80000000); |
| 38 | S32 numberExtendedIds = extendedInfo[0]; |
| 39 | |
| 40 | // Sets brand |
| 41 | if (numberExtendedIds >= 0x80000004) |
| 42 | { |
| 43 | int offset = 0; |
| 44 | for (int i = 0; i < 3; ++i) |
| 45 | { |
| 46 | S32 brandInfo[4]; |
| 47 | __cpuidex(brandInfo, 0x80000002 + i, 0); |
| 48 | |
| 49 | *reinterpret_cast<int*>(brand + offset + 0) = brandInfo[0]; |
| 50 | *reinterpret_cast<int*>(brand + offset + 4) = brandInfo[1]; |
| 51 | *reinterpret_cast<int*>(brand + offset + 8) = brandInfo[2]; |
| 52 | *reinterpret_cast<int*>(brand + offset + 12) = brandInfo[3]; |
| 53 | |
| 54 | offset += sizeof(S32) * 4; |
| 55 | } |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | enum CpuFlags |
| 60 | { |