* store and restore the 8087 control world only on x86 systems

git-svn-id: trunk@44922 -
(cherry picked from commit 1972b05cc8)
This commit is contained in:
svenbarth 2020-04-21 06:04:52 +00:00 committed by marcoonthegit
parent ffa53e69fb
commit 1b05238a38

View File

@ -1350,16 +1350,20 @@ end;
Procedure InitInternational;
var
{$if defined(CPU386) or defined(CPUX86_64)}
{ A call to GetSystemMetrics changes the value of the 8087 Control Word on
Pentium4 with WinXP SP2 }
old8087CW: word;
{$endif}
DefaultCustomLocaleID : LCID; // typedef DWORD LCID;
DefaultCustomLanguageID : Word; // typedef WORD LANGID;
begin
/// workaround for Windows 7 bug, see bug report #18574
SetThreadLocale(GetUserDefaultLCID);
InitInternationalGeneric;
{$if defined(CPU386) or defined(CPUX86_64)}
old8087CW:=Get8087CW;
{$endif}
SysLocale.MBCS:=GetSystemMetrics(SM_DBCSENABLED)<>0;
SysLocale.RightToLeft:=GetSystemMetrics(SM_MIDEASTENABLED)<>0;
SysLocale.DefaultLCID := $0409;
@ -1389,7 +1393,9 @@ begin
end;
end;
{$if defined(CPU386) or defined(CPUX86_64)}
Set8087CW(old8087CW);
{$endif}
GetFormatSettings;
if SysLocale.FarEast then GetEraNamesAndYearOffsets;
end;