forked from mia/Aegisub
Make VideoContext::Reset private and use SetVideo to close the video so that the change gets announced properly
Originally committed to SVN as r5903.
This commit is contained in:
parent
eb2a6e14fa
commit
dc8dbbb535
2 changed files with 5 additions and 4 deletions
|
@ -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();
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue