mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-03 16:25:54 +00:00
Force immediate destruction of the D3D11 swapchain
Possible fix for #959
This commit is contained in:
parent
d147d36867
commit
dc5414bd0d
@ -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…
x
Reference in New Issue
Block a user