From 83cdb1245753e9901f970abeb161ad0976348b26 Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Tue, 23 Jan 2007 06:44:08 +0000 Subject: [PATCH] Fixed several bugs related to detached video display. Originally committed to SVN as r884. --- aegisub/frame_main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/aegisub/frame_main.cpp b/aegisub/frame_main.cpp index c4364a822..f148736d6 100644 --- a/aegisub/frame_main.cpp +++ b/aegisub/frame_main.cpp @@ -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