From dc8dbbb53580296785199fee44418acc289378b8 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Wed, 23 Nov 2011 18:32:37 +0000 Subject: [PATCH] Make VideoContext::Reset private and use SetVideo to close the video so that the change gets announced properly Originally committed to SVN as r5903. --- aegisub/src/video_context.h | 5 +++-- aegisub/src/video_display.cpp | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/aegisub/src/video_context.h b/aegisub/src/video_context.h index 56f9165bd..2a0ca0477 100644 --- a/aegisub/src/video_context.h +++ b/aegisub/src/video_context.h @@ -153,6 +153,9 @@ class VideoContext : public wxEvtHandler { void OnSubtitlesCommit(); void OnSubtitlesSave(); + /// @brief Close the video, keyframes and timecodes + void Reset(); + public: /// File name of currently open video, if any wxString videoName; @@ -219,8 +222,6 @@ public: /// @brief Open a new video /// @param filename Video to open, or empty to close the current video void SetVideo(const wxString &filename); - /// @brief Close the video, keyframes and timecodes - void Reset(); /// @brief Close and reopen the current video void Reload(); diff --git a/aegisub/src/video_display.cpp b/aegisub/src/video_display.cpp index b15568841..07a78ccbb 100644 --- a/aegisub/src/video_display.cpp +++ b/aegisub/src/video_display.cpp @@ -164,7 +164,7 @@ void VideoDisplay::UploadFrameData(FrameReadyEvent &evt) { "programs and updating your video card drivers may fix this.\n" "Error message reported: %s", err.GetMessage()); - con->videoController->Reset(); + con->videoController->SetVideo(""); } catch (const VideoOutRenderException& err) { wxLogError( @@ -224,7 +224,7 @@ catch (const agi::Exception &err) { "An error occurred trying to render the video frame on the screen.\n" "Error message reported: %s", err.GetChainedMessage()); - con->videoController->Reset(); + con->videoController->SetVideo(""); } void VideoDisplay::DrawOverscanMask(float horizontal_percent, float vertical_percent) const {