Skip to content

Commit

Permalink
Adjust the animation time interval for the screen's refresh rate on m…
Browse files Browse the repository at this point in the history
…acOS 12.0 and later

This should give us ProMotion support, etc.
  • Loading branch information
nickzman committed Oct 26, 2021
1 parent 36bc693 commit b6304ef
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions RSSSkyrocketSaverView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,17 @@ - (void) setFrameSize:(NSSize)newSize
}
}


- (void)viewDidMoveToWindow
{
[super viewDidMoveToWindow];
if (@available(macOS 12.0, *)) // on Monterey and later, update the time interval for the window's screen's refresh rate
{
self.animationTimeInterval = self.window.screen.maximumRefreshInterval;
}
}


- (void)animateOneFrame
{
if (isConfiguring_==NO && _view!=nil)
Expand Down

0 comments on commit b6304ef

Please sign in to comment.