Skip to content

Commit

Permalink
Fix frame-rate crash on iPhone 11 Pro
Browse files Browse the repository at this point in the history
  • Loading branch information
jtrivedi committed Feb 26, 2023
1 parent 258c52f commit d95ce41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Wave/Internal/DisplayLinkProviding.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class CADisplayLinkProvider: DisplayLinkProviding {
if #available(iOS 15.0, *) {
let maximumFramesPerSecond = Float(UIScreen.main.maximumFramesPerSecond)
let highFPSEnabled = maximumFramesPerSecond > 60
let minimumFPS: Float = highFPSEnabled ? 80 : 60
let minimumFPS: Float = min(highFPSEnabled ? 80 : 60, maximumFramesPerSecond)
displayLinkProvider?.preferredFrameRateRange = .init(minimum: minimumFPS, maximum: maximumFramesPerSecond, preferred: maximumFramesPerSecond)
}
}
Expand Down

0 comments on commit d95ce41

Please sign in to comment.