mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-18 14:40:56 +00:00
Force immediate destruction of the D3D11 swapchain
Possible fix for #959
This commit is contained in:
@@ -141,6 +141,12 @@ D3D11VARenderer::~D3D11VARenderer()
|
|||||||
av_buffer_unref(&m_HwFramesContext);
|
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) {
|
if (m_HwDeviceContext != nullptr) {
|
||||||
// This will release m_Device and m_DeviceContext too
|
// This will release m_Device and m_DeviceContext too
|
||||||
av_buffer_unref(&m_HwDeviceContext);
|
av_buffer_unref(&m_HwDeviceContext);
|
||||||
|
|||||||
Reference in New Issue
Block a user