Cocoa: updating constants values to be friendly with arm cpus on mac, issue #39809

(cherry picked from commit 73bad58fd3)
This commit is contained in:
Dmitry Boyarintsev 2022-06-25 16:35:56 -04:00 committed by Maxim Ganetsky
parent 79dedefb44
commit 23915964d2
2 changed files with 6 additions and 2 deletions

View File

@ -11,6 +11,10 @@
// The issue is presumably only for 64-bit platform.
// The workaround is possible! the issue should be fixed in future
// release of FPC, but 3.0.4 is the offical supported by LCL.
{$if not(defined(CPUX86_64) or defined(CPUi386))}
{$define USE_IOS_VALUES}
{$endif}
{$if FPC_FULLVERSION>=30200}
{$undef BOOLFIX}
{$else}

View File

@ -443,8 +443,8 @@ type
// these constants are missing from CocoaAll for some reason
const
NSTextAlignmentLeft = 0;
NSTextAlignmentRight = 1; // it's 2 for iOS and family
NSTextAlignmentCenter = 2; // it's 1 for iOS and family
NSTextAlignmentRight = {$ifdef USE_IOS_VALUES}2{$else}1{$endif}; // it's 2 for iOS and family
NSTextAlignmentCenter = {$ifdef USE_IOS_VALUES}1{$else}2{$endif}; // it's 1 for iOS and family
NSTextAlignmentJustified = 3;
NSTextAlignmentNatural = 4;