forked from mia/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
|
// Set display mode
|
||||||
void FrameMain::SetDisplayMode(int _showVid,int _showAudio) {
|
void FrameMain::SetDisplayMode(int _showVid,int _showAudio) {
|
||||||
|
// Shown?
|
||||||
|
static bool firstRun = true;
|
||||||
|
if (!IsShownOnScreen() && !firstRun) return;
|
||||||
|
firstRun = false;
|
||||||
|
|
||||||
// Stop
|
// Stop
|
||||||
Freeze();
|
Freeze();
|
||||||
VideoContext::Get()->Stop();
|
VideoContext::Get()->Stop();
|
||||||
|
|
||||||
// Automatic
|
// 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;
|
if (_showAudio == -1) _showAudio = audioBox->loaded ? 1 : 0;
|
||||||
|
|
||||||
// See if anything changed
|
// See if anything changed
|
||||||
|
|
Loading…
Reference in a new issue