diff --git a/src/win/AppWin.cpp b/src/win/AppWin.cpp index fe01307..e034be0 100644 --- a/src/win/AppWin.cpp +++ b/src/win/AppWin.cpp @@ -115,6 +115,9 @@ AppWin::AppWin(Settings settings, Config config) Platform::instance().set_gpu_driver(gpu_driver_.get()); } else { gpu_context_.reset(); + // CPU fallback + surface_factory_.reset(new DIBSurfaceFactory(GetDC(0))); + Platform::instance().set_surface_factory(surface_factory_.get()); } #elif defined(DRIVER_D3D12) gpu_context_.reset(new GPUContextD3D12()); diff --git a/src/win/d3d11/GPUContextD3D11.cpp b/src/win/d3d11/GPUContextD3D11.cpp index 2a29e01..b75fdd9 100644 --- a/src/win/d3d11/GPUContextD3D11.cpp +++ b/src/win/d3d11/GPUContextD3D11.cpp @@ -62,6 +62,7 @@ GPUContextD3D11::GPUContextD3D11() { // Failed to create D3D11 device, fallback to CPU renderer immediate_context_.Reset(); device_.Reset(); + return; } // Create Enabled Blend State