mirror of https://github.com/odrling/Aegisub
Fixed several bugs related to detached video display.
Originally committed to SVN as r884.
This commit is contained in:
parent
8231034cb1
commit
83cdb12457
|
@ -719,12 +719,17 @@ int FrameMain::TryToCloseSubs(bool enableCancel) {
|
|||
////////////////////
|
||||
// Set display mode
|
||||
void FrameMain::SetDisplayMode(int _showVid,int _showAudio) {
|
||||
// Shown?
|
||||
static bool firstRun = true;
|
||||
if (!IsShownOnScreen() && !firstRun) return;
|
||||
firstRun = false;
|
||||
|
||||
// Stop
|
||||
Freeze();
|
||||
VideoContext::Get()->Stop();
|
||||
|
||||
// Automatic
|
||||
if (_showVid == -1) _showVid = VideoContext::Get()->IsLoaded() ? 1 : 0;
|
||||
if (_showVid == -1) _showVid = (VideoContext::Get()->IsLoaded() && !detachedVideo) ? 1 : 0;
|
||||
if (_showAudio == -1) _showAudio = audioBox->loaded ? 1 : 0;
|
||||
|
||||
// See if anything changed
|
||||
|
|
Loading…
Reference in New Issue