mirror of
https://github.com/odrling/Aegisub
synced 2025-04-11 22:56:02 +02:00
Select the OpenGL context when destroying VideoDisplay
This is needed to destroy the correct things when there are multiple active opengl displays.
This commit is contained in:
parent
c8d02de3db
commit
3747705a43
@ -126,6 +126,7 @@ VideoDisplay::VideoDisplay(wxToolBar *toolbar, bool freeSize, wxComboBox *zoomBo
|
||||
}
|
||||
|
||||
VideoDisplay::~VideoDisplay () {
|
||||
Unload();
|
||||
con->videoController->Unbind(EVT_FRAME_READY, &VideoDisplay::UploadFrameData, this);
|
||||
}
|
||||
|
||||
@ -435,8 +436,11 @@ Vector2D VideoDisplay::GetMousePosition() const {
|
||||
}
|
||||
|
||||
void VideoDisplay::Unload() {
|
||||
glContext.reset();
|
||||
if (glContext) {
|
||||
SetCurrent(*glContext);
|
||||
}
|
||||
videoOut.reset();
|
||||
tool.reset();
|
||||
glContext.reset();
|
||||
pending_frame.reset();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user