mirror of
https://github.com/yattee/yattee.git
synced 2026-10-31 17:07:18 +00:00
Fix player brightness controls on iPhone Duo
Brightness controls used UIScreen.main, which on iPhone Duo can be a different display than the one hosting the player. Route all brightness reads and writes through PlayerBrightness, which targets the screen of the window hosting the controls.
This commit is contained in:
@@ -57,6 +57,10 @@ struct PlayerControlsActions {
|
||||
/// behavior (details toggle, no rotate glyph, no orientation lock).
|
||||
var canRotate: Bool = true
|
||||
|
||||
/// Screen of the window hosting the controls; brightness targets it
|
||||
/// (iPhone Duo interior and exterior are separate screens).
|
||||
var screen: UIScreen?
|
||||
|
||||
/// iPad, or an iPhone windowing mode that can't rotate on request.
|
||||
var usesRotationFreeFullscreen: Bool { isIPad || !canRotate }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user