diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-10-29 13:39:14 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-10-29 13:39:14 +0100 |
| commit | c3ee794d40bdfbe41b5628bb8da6e41bc68bbac0 (patch) | |
| tree | b2c153786de9ce37236fd61153369934b733f234 /src/tools | |
| parent | c8502fa20cc38de2269d11c50fe6a5849719b663 (diff) | |
| download | box64-c3ee794d40bdfbe41b5628bb8da6e41bc68bbac0.tar.gz box64-c3ee794d40bdfbe41b5628bb8da6e41bc68bbac0.zip | |
Small change on cpuid stuffs
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/my_cpuid.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/tools/my_cpuid.c b/src/tools/my_cpuid.c index 9bf8cd82..6039f135 100644 --- a/src/tools/my_cpuid.c +++ b/src/tools/my_cpuid.c @@ -159,10 +159,6 @@ const char* getBoxCpuName() snprintf(branding, sizeof(branding), "Box64 on %.*s @%04d MHz", 28, name, MHz); } } - while(strlen(branding)<3*4*4) { - memmove(branding+1, branding, strlen(branding)); - branding[0] = ' '; - } } return branding; } @@ -173,7 +169,12 @@ void my_cpuid(x64emu_t* emu, uint32_t tmp32u) int ncpu = getNCpu(); if(ncpu>255) ncpu = 255; if(!ncpu) ncpu = 1; - const char* branding = getBoxCpuName(); + static char branding[3*4*4+1] = ""; + strcpy(branding, getBoxCpuName()); + while(strlen(branding)<3*4*4) { + memmove(branding+1, branding, strlen(branding)); + branding[0] = ' '; + } switch(tmp32u) { case 0x0: // emulate a P4. TODO: Emulate a Core2? |