Add iOS options for handling landscape fullscreen (fixes #38)

This commit is contained in:
Arkadiusz Fal
2022-01-02 20:43:30 +01:00
parent d6e75295e1
commit 00778b585f
5 changed files with 234 additions and 14 deletions

View File

@@ -82,6 +82,12 @@ extension Defaults.Keys {
#if os(macOS)
static let enableBetaChannel = Key<Bool>("enableBetaChannel", default: false)
#endif
#if os(iOS)
static let honorSystemOrientationLock = Key<Bool>("honorSystemOrientationLock", default: true)
static let enterFullscreenInLandscape = Key<Bool>("enterFullscreenInLandscape", default: UIDevice.current.userInterfaceIdiom == .phone)
static let lockLandscapeWhenEnteringFullscreen = Key<Bool>("lockLandscapeWhenEnteringFullscreen", default: false)
#endif
}
enum ResolutionSetting: String, CaseIterable, Defaults.Serializable {