[App] Only start D3D12 if DLL exists

This commit is contained in:
Triang3l
2019-08-03 22:33:09 +03:00
parent 9aaef8871d
commit 890a32bd98
5 changed files with 24 additions and 4 deletions

View File

@@ -105,10 +105,12 @@ std::unique_ptr<gpu::GraphicsSystem> CreateGraphicsSystem() {
std::unique_ptr<gpu::GraphicsSystem> best;
#if XE_PLATFORM_WIN32
best = std::unique_ptr<gpu::GraphicsSystem>(
new xe::gpu::d3d12::D3D12GraphicsSystem());
if (best) {
return best;
if (xe::gpu::d3d12::D3D12GraphicsSystem::IsD3D12APIAvailable()) {
best = std::unique_ptr<gpu::GraphicsSystem>(
new xe::gpu::d3d12::D3D12GraphicsSystem());
if (best) {
return best;
}
}
#endif // XE_PLATFORM_WIN32
best = std::unique_ptr<gpu::GraphicsSystem>(