ClassiCube icon indicating copy to clipboard operation
ClassiCube copied to clipboard

iOS: Add support for higher framerates on ProMotion devices

Open Skryptonyte opened this issue 4 months ago • 0 comments

This PR adds a new FPS limit option, LimitProMotion exclusive to iOS devices to make use of higher refresh rate ranges of ProMotion (up to 120Hz) on supported devices (iPhone 13 Pro and above). This is done by making a dummy CADisplayLink callback to hint iOS to set our refresh rate above 60Hz.

Due to the weirdness of ProMotion, there is no way to programmatically force 120Hz despite setting preferredFrameRateRange as such, and this is explicitly stated by Apple as well. On iPhone 15 Pro Max running iOS 18.1b5, I usually only reach up to 80Hz in normal settings. This may have to do with the iOS 18 update, which makes ProMotion much more conservative and locks most things to 80Hz. This might work a lot better on iOS 15-17, but I can't say for sure. For now, an extremely ugly workaround to guarantee the full 120Hz is to have screen recording running on the side (yes, really).

Your mileage with LimitProMotion may wary, so I made it a separate FPS limit option rather than having it work under LimitVsync.

If anybody else has the setup to test this particular feature, it would be really cool if you could share your results in this discussion.

Skryptonyte avatar Oct 03 '24 17:10 Skryptonyte