Adds support for syncing ControllerSkins
This commit is contained in:
parent
5b64ca7c7b
commit
557529b1e7
@ -9,6 +9,7 @@
|
||||
import Foundation
|
||||
|
||||
import DeltaCore
|
||||
import Harmony
|
||||
|
||||
extension ControllerSkinConfigurations
|
||||
{
|
||||
@ -90,3 +91,22 @@ extension ControllerSkin: ControllerSkinProtocol
|
||||
return self.controllerSkin?.aspectRatio(for: traits)
|
||||
}
|
||||
}
|
||||
|
||||
extension ControllerSkin: Syncable
|
||||
{
|
||||
public static var syncablePrimaryKey: AnyKeyPath {
|
||||
return \ControllerSkin.identifier
|
||||
}
|
||||
|
||||
public var syncableKeys: Set<AnyKeyPath> {
|
||||
return [\ControllerSkin.filename, \ControllerSkin.gameType, \ControllerSkin.name, \ControllerSkin.supportedConfigurations]
|
||||
}
|
||||
|
||||
public var syncableFiles: Set<File> {
|
||||
return [File(identifier: "skin", fileURL: self.fileURL)]
|
||||
}
|
||||
|
||||
public var isSyncingEnabled: Bool {
|
||||
return !self.isStandard
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user