Release DLLs after releasing D3D11/DXGI objects (and release dxgi.dll!)

d3d11
Caleb Cornett 2024-02-06 22:40:16 -06:00 committed by cosmonaut
parent c9f23dd73b
commit ca29f3b7da
1 changed files with 6 additions and 4 deletions

View File

@ -606,16 +606,18 @@ static void D3D11_DestroyDevice(
SDL_DestroyMutex(renderer->contextLock);
SDL_DestroyMutex(renderer->uniformBufferLock);
/* Release the DLLs */
SDL_UnloadObject(renderer->d3d11_dll);
SDL_UnloadObject(renderer->d3dcompiler_dll);
/* Release the device and associated objects */
ID3D11DeviceContext_Release(renderer->immediateContext);
ID3D11Device_Release(renderer->device);
IDXGIAdapter_Release(renderer->adapter);
IDXGIFactory_Release(renderer->factory);
/* Release the DLLs */
SDL_UnloadObject(renderer->d3d11_dll);
SDL_UnloadObject(renderer->dxgi_dll);
SDL_UnloadObject(renderer->d3dcompiler_dll);
/* Free the primary Refresh structures */
SDL_free(renderer);
SDL_free(device);
}