mirror of
https://github.com/utmapp/UTM.git
synced 2026-10-12 02:24:01 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user