Skip to content

Commit

Permalink
Remove references to xrOS that are no longer applicable.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvasselli committed Oct 30, 2023
1 parent bd4c8d5 commit 556ef9c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 2 additions & 6 deletions Source/Device.generated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -983,16 +983,12 @@ public enum Device {

public var isZoomed: Bool? {
guard isCurrent else { return nil }
#if os(xrOS)
return nil
#else
if Int(UIScreen.main.scale.rounded()) == 3 {
// Plus-sized
return UIScreen.main.nativeScale > 2.7 && UIScreen.main.nativeScale < 3
} else {
return UIScreen.main.nativeScale > UIScreen.main.scale
}
#endif
}

/// All Touch ID Capable Devices
Expand Down Expand Up @@ -1380,7 +1376,7 @@ public enum Device {

/// The brightness level of the screen.
public var screenBrightness: Int {
#if os(iOS) && !os(xrOS)
#if os(iOS)
return Int(UIScreen.main.brightness * 100)
#else
return 100
Expand Down Expand Up @@ -1795,7 +1791,7 @@ extension Device.BatteryState: Comparable {
}
#endif

#if os(iOS) && !os(xrOS)
#if os(iOS)
extension Device {
// MARK: Orientation
/**
Expand Down
8 changes: 2 additions & 6 deletions Source/Device.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -583,16 +583,12 @@ public enum Device {

public var isZoomed: Bool? {
guard isCurrent else { return nil }
#if os(xrOS)
return nil
#else
if Int(UIScreen.main.scale.rounded()) == 3 {
// Plus-sized
return UIScreen.main.nativeScale > 2.7 && UIScreen.main.nativeScale < 3
} else {
return UIScreen.main.nativeScale > UIScreen.main.scale
}
#endif
}

/// All Touch ID Capable Devices
Expand Down Expand Up @@ -885,7 +881,7 @@ public enum Device {

/// The brightness level of the screen.
public var screenBrightness: Int {
#if os(iOS) && !os(xrOS)
#if os(iOS)
return Int(UIScreen.main.brightness * 100)
#else
return 100
Expand Down Expand Up @@ -1108,7 +1104,7 @@ extension Device.BatteryState: Comparable {
}
#endif

#if os(iOS) && !os(xrOS)
#if os(iOS)
extension Device {
// MARK: Orientation
/**
Expand Down

0 comments on commit 556ef9c

Please sign in to comment.