diff --git a/Common/GPU/D3D11/thin3d_d3d11.cpp b/Common/GPU/D3D11/thin3d_d3d11.cpp index beaaa8e1c4..4e27b8d690 100644 --- a/Common/GPU/D3D11/thin3d_d3d11.cpp +++ b/Common/GPU/D3D11/thin3d_d3d11.cpp @@ -18,7 +18,9 @@ #include #include +#ifndef __LIBRETRO__ // their build server uses an old SDK #include +#endif #include #include #include @@ -369,6 +371,7 @@ D3D11DrawContext::D3D11DrawContext(ID3D11Device *device, ID3D11DeviceContext *de caps_.supportsD3D9 = false; } +#ifndef __LIBRETRO__ // their build server uses an old SDK if (swapChain_) { DXGI_SWAP_CHAIN_DESC swapChainDesc; swapChain_->GetDesc(&swapChainDesc); @@ -377,7 +380,7 @@ D3D11DrawContext::D3D11DrawContext(ID3D11Device *device, ID3D11DeviceContext *de swapChainTearingSupported_ = true; } } - +#endif // Temp texture for read-back of small images. Custom textures are created on demand for larger ones. // TODO: Should really benchmark if this extra complexity has any benefit. D3D11_TEXTURE2D_DESC packDesc{}; @@ -496,7 +499,9 @@ void D3D11DrawContext::Present(PresentMode presentMode, int vblanks) { uint32_t flags = 0; if (presentMode != PresentMode::FIFO) { interval = 0; +#ifndef __LIBRETRO__ // their build server uses an old SDK flags |= swapChainTearingSupported_ ? DXGI_PRESENT_ALLOW_TEARING : 0; // Assume "vsync off" also means "allow tearing" +#endif } swapChain_->Present(interval, flags); } diff --git a/Windows/GPU/D3D11Context.cpp b/Windows/GPU/D3D11Context.cpp index e412da23b8..5a4d23d0aa 100644 --- a/Windows/GPU/D3D11Context.cpp +++ b/Windows/GPU/D3D11Context.cpp @@ -1,7 +1,9 @@ #include "ppsspp_config.h" #include "Common/CommonWindows.h" +#ifndef __LIBRETRO__ // their build server uses an old SDK #include +#endif #include #include @@ -178,6 +180,7 @@ bool D3D11Context::Init(HINSTANCE hInst, HWND wnd, std::string *error_message) { swapChainDesc_.Windowed = TRUE; swapChainDesc_.SwapEffect = DXGI_SWAP_EFFECT_DISCARD; +#ifndef __LIBRETRO__ // their build server uses an old SDK IDXGIFactory5 *dxgiFactory5 = nullptr; hr = dxgiFactory->QueryInterface(__uuidof(IDXGIFactory5), (void**)&dxgiFactory5); if (SUCCEEDED(hr)) { @@ -191,6 +194,7 @@ bool D3D11Context::Init(HINSTANCE hInst, HWND wnd, std::string *error_message) { } dxgiFactory5->Release(); } +#endif hr = dxgiFactory->CreateSwapChain(device_, &swapChainDesc_, &swapChain_); dxgiFactory->MakeWindowAssociation(hWnd_, DXGI_MWA_NO_ALT_ENTER);