Skip to content

Commit

Permalink
Fix macOS Build
Browse files Browse the repository at this point in the history
  • Loading branch information
b3ll committed Oct 12, 2024
1 parent c8611d9 commit c460622
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let package = Package(
platforms: [
.iOS(.v13),
.tvOS(.v13),
.macOS(.v10_14),
.macOS(.v10_15),
.visionOS(.v1)
],
products: [
Expand Down
1 change: 1 addition & 0 deletions Sources/Motion/Utilities/AnimationDriver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ import Cocoa

typealias SystemAnimationDriver = CoreVideoDriver

@MainActor
final class CoreVideoDriver: AnimationDriver {

private var displaylink: CVDisplayLink!
Expand Down
1 change: 1 addition & 0 deletions Sources/Motion/Utilities/AnimationEnvironmentProxy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import AppKit
it wouldn't be safe to start the animation in `viewDidLoad`. Generally, a safe place to start an animation tied to a view or view controller
is any time after `viewDidAppear` and before `viewDidDisappear`, which is when the view is in a window, and its window is on screen.
*/
@MainActor
public protocol AnimationEnvironmentProxy: AnimationEnvironment {
var proxiedAnimationEnvironment: AnimationEnvironment { get }
}
Expand Down
2 changes: 2 additions & 0 deletions Sources/Motion/Utilities/NSScreen+AnimationEnvironment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public final class DefaultAnimationEnvironment: NSScreen {
}
}

@MainActor
extension NSScreen: AnimationEnvironment {
private var environmentStorage: AnimationEnvironmentStorage { AnimationEnvironmentStorage.shared }

Expand All @@ -35,6 +36,7 @@ private extension NSDeviceDescriptionKey {
static let screenNumber = NSDeviceDescriptionKey("NSScreenNumber")
}

@MainActor
private final class AnimationEnvironmentStorage {
static let shared = AnimationEnvironmentStorage()

Expand Down

0 comments on commit c460622

Please sign in to comment.