Skip to content

Commit

Permalink
Disable zoom-in on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
Berstanio authored and kakashidinho committed Jul 11, 2022
1 parent 317eaf3 commit 850c87b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions ios/xcode/MGLKit/MGLLayer+Private.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#import "MGLLayer.h"

#import <QuartzCore/CAMetalLayer.h>
#import <QuartzCore/QuartzCore.h>

#include <EGL/egl.h>
#include <GLES2/gl2.h>
Expand Down
4 changes: 4 additions & 0 deletions ios/xcode/MGLKit/MGLLayer.mm
Original file line number Diff line number Diff line change
Expand Up @@ -680,10 +680,14 @@ - (void)checkLayerSize
if (rx::IsMetalDisplayAvailable())
{
// Resize the metal layer
[CATransaction begin];
[CATransaction setValue:(id)kCFBooleanTrue
forKey:kCATransactionDisableActions];
_metalLayer.frame = self.bounds;
_metalLayer.drawableSize =
CGSizeMake(_metalLayer.bounds.size.width * _metalLayer.contentsScale,
_metalLayer.bounds.size.height * _metalLayer.contentsScale);
[CATransaction commit];
}
else
{
Expand Down

0 comments on commit 850c87b

Please sign in to comment.