libretro D3D11: Attempt at fixing a build error

This commit is contained in:
Henrik Rydgård 2023-08-15 00:30:36 +02:00
parent b9b7342ffd
commit 5959481a3e
2 changed files with 5 additions and 2 deletions

View file

@ -438,7 +438,10 @@ void D3D11DrawContext::Present(PresentMode presentMode, int vblanks) {
if (presentMode != PresentMode::FIFO) {
interval = 0;
}
swapChain_->Present(interval, 0);
// Safety for libretro
if (swapChain_) {
swapChain_->Present(interval, 0);
}
curRenderTargetView_ = nullptr;
curDepthStencilView_ = nullptr;
frameCount_++;

View file

@ -46,7 +46,7 @@ void LibretroD3D11Context::CreateDrawContext() {
ID3D11DeviceContext1 *context1 = nullptr;
d3d11_->context->QueryInterface(__uuidof(ID3D11DeviceContext1), (void **)&context1);
draw_ = Draw::T3DCreateD3D11Context(d3d11_->device, d3d11_->context, device1, context1, d3d11_->featureLevel, NULL, adapterNames, 3);
draw_ = Draw::T3DCreateD3D11Context(d3d11_->device, d3d11_->context, device1, context1, nullptr, d3d11_->featureLevel, NULL, adapterNames, 3);
}
void LibretroD3D11Context::DestroyDrawContext() {