Skip to content

Commit b39b48c

Browse files
authored
Remove macOS display refresh rate support (#2628)
1 parent f0c4b72 commit b39b48c

File tree

2 files changed

+9
-23
lines changed

2 files changed

+9
-23
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
### Other
6+
7+
- Remove macOS display refresh rate support ([#2628](https://github.com/getsentry/sentry-dart/pull/2628))
8+
- Can't reliably detect on multi-monitor systems and on older macOS versions.
9+
- Not very meaningful, as other applications may be running in parallel and affecting it.
10+
311
## 8.13.0
412

513
### Breaking changes

flutter/ios/sentry_flutter/Sources/sentry_flutter/SentryFlutterPlugin.swift

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -741,29 +741,7 @@ public class SentryFlutterPlugin: NSObject, FlutterPlugin {
741741
}
742742
#elseif os(macOS)
743743
private func displayRefreshRate(_ result: @escaping FlutterResult) {
744-
// We don't use CADisplayLink for macOS because it's only available starting with macOS 14
745-
guard let window = NSApplication.shared.keyWindow else {
746-
result(nil)
747-
return
748-
}
749-
750-
guard let screen = window.screen else {
751-
result(nil)
752-
return
753-
}
754-
755-
guard let displayID =
756-
screen.deviceDescription[NSDeviceDescriptionKey("NSScreenNumber")] as? CGDirectDisplayID else {
757-
result(nil)
758-
return
759-
}
760-
761-
guard let mode = CGDisplayCopyDisplayMode(displayID) else {
762-
result(nil)
763-
return
764-
}
765-
766-
result(Int(mode.refreshRate))
744+
result(nil)
767745
}
768746
#endif
769747

0 commit comments

Comments
 (0)