Jump to content
enesgeven

iOS Metal Api form doesn't fit on screen

Recommended Posts

Hi,

 

I found this bug today, I reported already embc but I need also tips about this bug.

 

When Delphi FMX iOS Metal Api enabled and iPhone Settings>Display&Brigtness>View>Zoomed options is enabled delphi form doesn't fit on screen.


When Metal Api or iPhone Zoomed setting is disable, everything is normal, like that:
https://drive.google.com/file/d/179zVuQx2duHsIIfi6FSiKgVBToZZXLmq/view

When Metal Api and iPhone Zoomed setting is enable, form doesn't fit on screen, like that:
https://drive.google.com/file/d/1xkNt3ju15fp1z9RG_weyBl6K_OwtBFsd/view


(Tested with Delphi 10.4.1 clean and empty project)

Can I try anything about fix this issue? before embc officially fix, I need quick solutions.
Thank you.

 

 

 

Edited by enesgeven

Share this post


Link to post

Where did you turn Metal on? To true?
It should be done in the .dpr file, not in a .pas file... That makes a lot of difference.

Something like

 

....

{$R *.res}

begin
      {$IF DEFINED(iOS) or DEFINED(MACOS)}
         GlobalUseMetal := True ;
      {$ENDIF}

  Application.Initialize;
 

 

Edited by sjordi

Share this post


Link to post

Thank you.

Yes I am doing like that on .dpr before Application.Initialize;

also I tried on main form .pas initialization but both same result.

 

I did this for temporary, when device Display Zoom setting is Zoomed not activating metal api, this will reduce performance but at least application will work.

    if TUIScreen.Wrap(TUIScreen.OCClass.mainScreen).nativeScale=TUIScreen.Wrap(TUIScreen.OCClass.mainScreen).Scale then
    begin
      GlobalUseMetal:=true;
      GlobalEventDrivenDisplayUpdates:=False;
      GlobalPreferredFramesPerSecond:=60;
    end;

 

  • Like 1

Share this post


Link to post

Hi @enesgeven

 

I didn't find this issue in the quality portal so I reported it: https://quality.embarcadero.com/browse/RSP-37935

Just a tip: This issue is fixed in the latest version of Skia4Delphi (3.3.2). Not only this problem but a dozen others. Our Metal is as stable as OpenGL. Just enable Skia4Delphi as your app's renderer, and all issues will be resolved.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×