@@ -293,7 +293,9 @@ Vector2 GetWindowPosition(void)
293
293
// Get window scale DPI factor for current monitor
294
294
Vector2 GetWindowScaleDPI (void )
295
295
{
296
- return (Vector2 ){ 1.0f , 1.0f };
296
+ CGFloat scale = [[UIScreen mainScreen ] scale ];
297
+ return (Vector2 ){ scale , scale };
298
+ // return (Vector2){ 1.0f, 1.0f };
297
299
}
298
300
299
301
// Set clipboard text content
@@ -595,6 +597,13 @@ int InitPlatform(void)
595
597
//----------------------------------------------------------------------------
596
598
// ...
597
599
//----------------------------------------------------------------------------
600
+ // Initialize OpenGL context (states and resources)
601
+ // NOTE: CORE.Window.currentFbo.width and CORE.Window.currentFbo.height not used, just stored as globals in rlgl
602
+ rlglInit (CORE .Window .currentFbo .width , CORE .Window .currentFbo .height );
603
+
604
+ // Setup default viewport
605
+ // NOTE: It updated CORE.Window.render.width and CORE.Window.render.height
606
+ SetupViewport (CORE .Window .currentFbo .width , CORE .Window .currentFbo .height );
598
607
599
608
// TODO: Initialize timing system
600
609
//----------------------------------------------------------------------------
@@ -647,6 +656,7 @@ void ClosePlatform(void)
647
656
// self.modalPresentationCapturesStatusBarAppearance = true;
648
657
platform .viewController = self ;
649
658
self .view .multipleTouchEnabled = true;
659
+ self .view .contentScaleFactor = [[UIScreen mainScreen ] scale ];
650
660
}
651
661
652
662
- (bool )prefersStatusBarHidden
0 commit comments