mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2025-01-24 00:25:06 +00:00
Force immediate destruction of the D3D11 swapchain
Possible fix for #959
This commit is contained in:
parent
d147d36867
commit
dc5414bd0d
1 changed files with 6 additions and 0 deletions
|
@ -141,6 +141,12 @@ D3D11VARenderer::~D3D11VARenderer()
|
|||
av_buffer_unref(&m_HwFramesContext);
|
||||
}
|
||||
|
||||
// Force destruction of the swapchain immediately
|
||||
if (m_DeviceContext != nullptr) {
|
||||
m_DeviceContext->ClearState();
|
||||
m_DeviceContext->Flush();
|
||||
}
|
||||
|
||||
if (m_HwDeviceContext != nullptr) {
|
||||
// This will release m_Device and m_DeviceContext too
|
||||
av_buffer_unref(&m_HwDeviceContext);
|
||||
|
|
Loading…
Reference in a new issue