mirror of
https://github.com/reactos/wine.git
synced 2025-02-12 15:38:29 +00:00
Return a more plausible value for MinimumApplicationAddress.
This commit is contained in:
parent
a5b696b6b4
commit
bec545ae98
11
misc/cpu.c
11
misc/cpu.c
@ -9,7 +9,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "winbase.h"
|
#include "winbase.h"
|
||||||
#include "wine/winbase16.h"
|
|
||||||
#include "wine/winestring.h"
|
#include "wine/winestring.h"
|
||||||
#include "winreg.h"
|
#include "winreg.h"
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
@ -59,8 +58,8 @@ VOID WINAPI GetSystemInfo(
|
|||||||
cachedsi.u.s.wProcessorArchitecture = PROCESSOR_ARCHITECTURE_INTEL;
|
cachedsi.u.s.wProcessorArchitecture = PROCESSOR_ARCHITECTURE_INTEL;
|
||||||
cachedsi.dwPageSize = VIRTUAL_GetPageSize();
|
cachedsi.dwPageSize = VIRTUAL_GetPageSize();
|
||||||
|
|
||||||
/* FIXME: better values for the two entries below... */
|
/* FIXME: the two entries below should be computed somehow... */
|
||||||
cachedsi.lpMinimumApplicationAddress = (void *)0x40000000;
|
cachedsi.lpMinimumApplicationAddress = (void *)0x00010000;
|
||||||
cachedsi.lpMaximumApplicationAddress = (void *)0x7FFFFFFF;
|
cachedsi.lpMaximumApplicationAddress = (void *)0x7FFFFFFF;
|
||||||
cachedsi.dwActiveProcessorMask = 1;
|
cachedsi.dwActiveProcessorMask = 1;
|
||||||
cachedsi.dwNumberOfProcessors = 1;
|
cachedsi.dwNumberOfProcessors = 1;
|
||||||
@ -75,7 +74,7 @@ VOID WINAPI GetSystemInfo(
|
|||||||
/* Hmm, reasonable processor feature defaults? */
|
/* Hmm, reasonable processor feature defaults? */
|
||||||
|
|
||||||
/* Create this registry key for all systems */
|
/* Create this registry key for all systems */
|
||||||
if (RegCreateKey16(HKEY_LOCAL_MACHINE,"HARDWARE\\DESCRIPTION\\System\\CentralProcessor",&hkey)!=ERROR_SUCCESS) {
|
if (RegCreateKeyA(HKEY_LOCAL_MACHINE,"HARDWARE\\DESCRIPTION\\System\\CentralProcessor",&hkey)!=ERROR_SUCCESS) {
|
||||||
WARN("Unable to register CPU information\n");
|
WARN("Unable to register CPU information\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,7 +180,7 @@ VOID WINAPI GetSystemInfo(
|
|||||||
sprintf(buf,"%d",x);
|
sprintf(buf,"%d",x);
|
||||||
if (xhkey)
|
if (xhkey)
|
||||||
RegCloseKey(xhkey);
|
RegCloseKey(xhkey);
|
||||||
RegCreateKey16(hkey,buf,&xhkey);
|
RegCreateKeyA(hkey,buf,&xhkey);
|
||||||
}
|
}
|
||||||
if (!strncasecmp(line,"stepping",strlen("stepping"))) {
|
if (!strncasecmp(line,"stepping",strlen("stepping"))) {
|
||||||
int x;
|
int x;
|
||||||
@ -203,7 +202,7 @@ VOID WINAPI GetSystemInfo(
|
|||||||
#else /* linux */
|
#else /* linux */
|
||||||
/* FIXME: how do we do this on other systems? */
|
/* FIXME: how do we do this on other systems? */
|
||||||
|
|
||||||
RegCreateKey16(hkey,"0",&xhkey);
|
RegCreateKeyA(hkey,"0",&xhkey);
|
||||||
RegSetValueExA(xhkey,"Identifier",0,REG_SZ,"CPU 386",strlen("CPU 386"));
|
RegSetValueExA(xhkey,"Identifier",0,REG_SZ,"CPU 386",strlen("CPU 386"));
|
||||||
#endif /* !linux */
|
#endif /* !linux */
|
||||||
if (xhkey)
|
if (xhkey)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user