mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 20:49:23 +02:00
* store and restore the 8087 control world only on x86 systems
git-svn-id: trunk@44922 -
This commit is contained in:
parent
c474b95dfc
commit
1972b05cc8
@ -1093,16 +1093,20 @@ end;
|
|||||||
|
|
||||||
Procedure InitInternational;
|
Procedure InitInternational;
|
||||||
var
|
var
|
||||||
|
{$if defined(CPU386) or defined(CPUX86_64)}
|
||||||
{ A call to GetSystemMetrics changes the value of the 8087 Control Word on
|
{ A call to GetSystemMetrics changes the value of the 8087 Control Word on
|
||||||
Pentium4 with WinXP SP2 }
|
Pentium4 with WinXP SP2 }
|
||||||
old8087CW: word;
|
old8087CW: word;
|
||||||
|
{$endif}
|
||||||
DefaultCustomLocaleID : LCID; // typedef DWORD LCID;
|
DefaultCustomLocaleID : LCID; // typedef DWORD LCID;
|
||||||
DefaultCustomLanguageID : Word; // typedef WORD LANGID;
|
DefaultCustomLanguageID : Word; // typedef WORD LANGID;
|
||||||
begin
|
begin
|
||||||
/// workaround for Windows 7 bug, see bug report #18574
|
/// workaround for Windows 7 bug, see bug report #18574
|
||||||
SetThreadLocale(GetUserDefaultLCID);
|
SetThreadLocale(GetUserDefaultLCID);
|
||||||
InitInternationalGeneric;
|
InitInternationalGeneric;
|
||||||
|
{$if defined(CPU386) or defined(CPUX86_64)}
|
||||||
old8087CW:=Get8087CW;
|
old8087CW:=Get8087CW;
|
||||||
|
{$endif}
|
||||||
SysLocale.MBCS:=GetSystemMetrics(SM_DBCSENABLED)<>0;
|
SysLocale.MBCS:=GetSystemMetrics(SM_DBCSENABLED)<>0;
|
||||||
SysLocale.RightToLeft:=GetSystemMetrics(SM_MIDEASTENABLED)<>0;
|
SysLocale.RightToLeft:=GetSystemMetrics(SM_MIDEASTENABLED)<>0;
|
||||||
SysLocale.DefaultLCID := $0409;
|
SysLocale.DefaultLCID := $0409;
|
||||||
@ -1132,7 +1136,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$if defined(CPU386) or defined(CPUX86_64)}
|
||||||
Set8087CW(old8087CW);
|
Set8087CW(old8087CW);
|
||||||
|
{$endif}
|
||||||
GetFormatSettings;
|
GetFormatSettings;
|
||||||
if SysLocale.FarEast then GetEraNamesAndYearOffsets;
|
if SysLocale.FarEast then GetEraNamesAndYearOffsets;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user