From 924803b22da835b8d58ec20e6ea18cc06ce01ca7 Mon Sep 17 00:00:00 2001 From: The412Banner Date: Sun, 11 Oct 2026 04:02:35 -0400 Subject: [PATCH] [d3d10] fix d3d10core crashing every d3d10 game d3d10core was calling D3D11CoreCreateDevice with the newer 10 argument version, but sarek's d3d11.dll still exports the old 6 argument one. The device ended up in the wrong spot, so every d3d10 game got a null device and crashed right away. Go back to the 6 argument call and link d3d10core against sarek's own d3d11 again. --- src/d3d10/d3d10_core.cpp | 10 +++------- src/d3d10/meson.build | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/d3d10/d3d10_core.cpp b/src/d3d10/d3d10_core.cpp index 5ae0ac69929..d4d229ed849 100644 --- a/src/d3d10/d3d10_core.cpp +++ b/src/d3d10/d3d10_core.cpp @@ -9,14 +9,10 @@ extern "C" { HRESULT __stdcall D3D11CoreCreateDevice( IDXGIFactory* pFactory, IDXGIAdapter* pAdapter, - D3D_DRIVER_TYPE DriverType, - HMODULE Software, UINT Flags, const D3D_FEATURE_LEVEL* pFeatureLevels, UINT FeatureLevels, - UINT SDKVersion, - ID3D11Device** ppDevice, - D3D_FEATURE_LEVEL* pFeatureLevel); + ID3D11Device** ppDevice); DLLEXPORT HRESULT __stdcall D3D10CoreCreateDevice( @@ -35,8 +31,8 @@ extern "C" { if (FAILED(hr)) return hr; - hr = D3D11CoreCreateDevice(pFactory, pAdapter, D3D_DRIVER_TYPE_UNKNOWN, - nullptr, Flags, &FeatureLevel, 1, D3D11_SDK_VERSION, &d3d11Device, nullptr); + hr = D3D11CoreCreateDevice(pFactory, pAdapter, + Flags, &FeatureLevel, 1, &d3d11Device); if (FAILED(hr)) return hr; diff --git a/src/d3d10/meson.build b/src/d3d10/meson.build index c61d5e2014c..20324939d61 100644 --- a/src/d3d10/meson.build +++ b/src/d3d10/meson.build @@ -6,7 +6,7 @@ d3d10_core_src = [ d3d10_core_dll = shared_library('d3d10core'+dll_ext, d3d10_core_src, d3d10_core_res, name_prefix : '', - dependencies : [ lib_d3d11 ], + dependencies : [ d3d11_dep ], include_directories : dxvk_include_path, install : true, vs_module_defs : 'd3d10core'+def_spec_ext,