At present the Splash Display within the engine makes use of a tough coded displayRatio setting within the construct configuration and I suppose that’s making an attempt to fill the position of what I really need. I want this worth to be dynamic based mostly on the system that’s working the sport.
Cellular net gadgets are available varied facet ratios that will or could not match the design ratio. We have to evaluate the design facet ratio to the system facet ratio and use that as a multiplier on the splash display screen to make sure it suits. Beforehand iPhone had 1.77 facet ratio however newer gadgets appear to be 2.16.
Usually designers can be designing for a 1.77 facet ratio, so we would wish a ratio modifier based mostly on the system it runs on. It could be 1.0 for older gadgets and 1.22 for newer. However relatively than onerous code these values, I wish to use the facet ratio of the system and the facet ratio of the design decision to calculate it dynamically.
This alteration would in all probability negate the necessity for the onerous coded displayRatio in settings and tbh, I’m not even certain why that exists because it isn’t dynamic.
I’ve examined this modification domestically and it really works for my wants. I’ve a PR Help system vs design facet ratio by mikecoker · Pull Request #12159 · cocos/cocos-engine · GitHub