Minor step forward

This commit is contained in:
Henrik Rydgård committed 2026-02-13 18:16:26 +01:00
1 parent 8e06e4c5c2
commit 7b84e42218
1 file changed
+17 -9
+17 -9
View File
@@ -326,12 +326,8 @@ void VulkanRenderLoop(IOSVulkanContext *graphicsContext, CAMetalLayer *metalLaye
- (void)loadView {
INFO_LOG(Log::G3D, "Creating metal view");
CGRect screenRect = [[UIScreen mainScreen] bounds];
CGFloat screenWidth = screenRect.size.width;
CGFloat screenHeight = screenRect.size.height;
PPSSPPMetalView *metalView = [[PPSSPPMetalView alloc] initWithFrame:CGRectMake(0, 0, screenWidth,screenHeight)];
// The view gets auto-resized later.
PPSSPPMetalView *metalView = [[PPSSPPMetalView alloc] initWithFrame:CGRectMake(0, 0, 0, 0)];
self.view = metalView;
}
@@ -379,14 +375,26 @@ void VulkanRenderLoop(IOSVulkanContext *graphicsContext, CAMetalLayer *metalLaye
- (void)viewDidDisappear:(BOOL)animated {
[super viewDidDisappear: animated];
INFO_LOG(Log::G3D, "viewWillDisappear");
INFO_LOG(Log::G3D, "viewDidDisappear");
}
- (void)bindDefaultFBO
{
- (void)bindDefaultFBO {
// Do nothing
}
- (void)viewWillLayoutSubviews {
[super viewWillLayoutSubviews];
// This is the first reliable place where self.view.bounds
// matches the forced orientation.
CGRect bounds = self.view.bounds;
INFO_LOG(Log::G3D, "Correcting metal view layout: %dx%d",
(int)bounds.size.width, (int)bounds.size.height);
// Update your Metal layer/viewport here if necessary
}
- (void)viewWillTransitionToSize:(CGSize)size
withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {
[super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];