Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ios device bad display effect #4265

Merged
merged 2 commits into from Feb 25, 2022
Merged

Fix ios device bad display effect #4265

merged 2 commits into from Feb 25, 2022

Conversation

timlyeee
Copy link
Contributor

@timlyeee timlyeee requested a review from minggo February 23, 2022 11:24
@timlyeee
Copy link
Contributor Author

测试过相关的issue https://github.com/cocos-creator/3d-tasks/issues/5814 没有问题。

CAMetalLayer *layer = (CAMetalLayer *)self.view.layer;
CGSize tsize = CGSizeMake(static_cast<int>(size.width * pixelRatio),
static_cast<int>(size.height * pixelRatio));
//self.view.contentScaleFactor = pixelRatio;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没用的代码就删除吧

cc::EventDispatcher::dispatchOrientationChangeEvent((int) orientation);
_lastOrientation = orientation;
}
cc::EventDispatcher::dispatchOrientationChangeEvent((int) orientation);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

也要 static_cast 吧

@timlyeee timlyeee closed this Feb 25, 2022
@timlyeee timlyeee reopened this Feb 25, 2022
@timlyeee
Copy link
Contributor Author

restart ci

@timlyeee timlyeee closed this Feb 25, 2022
@timlyeee timlyeee reopened this Feb 25, 2022
@minggo minggo merged commit f6b9518 into cocos:v3.4.2 Feb 25, 2022
@timlyeee
Copy link
Contributor Author

timlyeee commented Mar 8, 2022

Update 2022.03.08:

This Pull request didn't provide enough information to developers.

Without the fix, when the developer builds an app with several orientations, the display effect for the start orientation is good, but once the orientation is changed, the screen is stretched and touchpoints are lost.
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants