Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.

Commit fa24401

Browse files
low-battCarterLi
authored andcommitted
Fix fullscreen only works for first video, iina#4202
This commit will: - Remove a check in `PlayerCore.fileLoaded` that only put the player into full screen mode for the first file - Remove the property `justLaunched` from `PlaybackInfo` This causes the "Enter fullscreen" setting under the "When media is opened" settings to when enabled put the player into full screen mode for all videos, not just the first video played.
1 parent 8b832e6 commit fa24401

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

iina/PlaybackInfo.swift

-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ class PlaybackInfo {
9191
}
9292
}
9393

94-
var justLaunched: Bool = true
9594
var justStartedFile: Bool = false
9695
var justOpenedFile: Bool = false
9796
var shouldAutoLoadFiles: Bool = false

iina/PlayerCore.swift

+2-6
Original file line numberDiff line numberDiff line change
@@ -1381,12 +1381,8 @@ class PlayerCore: NSObject {
13811381
miniPlayer.defaultAlbumArt.isHidden = self.info.vid != 0
13821382
}
13831383
}
1384-
// set initial properties for the first file
1385-
if info.justLaunched {
1386-
if Preference.bool(for: .fullScreenWhenOpen) && !mainWindow.fsState.isFullscreen && !isInMiniPlayer {
1387-
DispatchQueue.main.async(execute: self.mainWindow.toggleWindowFullScreen)
1388-
}
1389-
info.justLaunched = false
1384+
if Preference.bool(for: .fullScreenWhenOpen) && !mainWindow.fsState.isFullscreen && !isInMiniPlayer {
1385+
DispatchQueue.main.async(execute: self.mainWindow.toggleWindowFullScreen)
13901386
}
13911387
// add to history
13921388
if let url = info.currentURL {

0 commit comments

Comments
 (0)