ios: read the idiom for the ProMotion default from the view's traits

UIDevice.currentDevice.userInterfaceIdiom is what Apple's resizability
audit asks to replace with the trait collection. The branches and the
result stay the same: only iPad defaults to the display's maximum frame
rate, iPhone keeps 60 Hz unless the FPS limit setting says otherwise.

Assisted-by: Claude:claude-fable-5-1
This commit is contained in:
osy
2026-09-24 20:52:49 -05:00
parent 0ef08849a6
commit 701041b586
@@ -131,7 +131,7 @@ static const NSInteger kResizeTimeoutSecs = 5;
self.mtkView.preferredFramesPerSecond = [self integerForSetting:@"QEMURendererFPSLimit"];
}
#if !TARGET_OS_VISION
else if (UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPad) {
else if (self.traitCollection.userInterfaceIdiom == UIUserInterfaceIdiomPad) {
// only apply ProMotion by default on iPad which has a larger battery
// on iPhone, we depend on the user manually setting the FPS limit to 120
NSInteger maxFps = self.view.window.screen.maximumFramesPerSecond;