From 336500c8ae9b642f60f9e71e0e0bf2bb28e9bbd8 Mon Sep 17 00:00:00 2001 From: bicarus <202771338+bicarus-dev@users.noreply.github.com> Date: Sun, 5 Apr 2026 16:18:19 -0700 Subject: [PATCH] ccj: fix D3D10Warp.dll_unloaded issue (#609) ## Link to GitHub Issue or related Pull Request, if one exists #0 ## Description of change Fix random crashes with CCJ. This should remove the need to add `d3d10warp.dll` to ` preload_libraries` in `ee-config.xml`. ## Testing Tried a couple games and didn't run into the crash.. --- src/spice2x/games/ccj/ccj.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/spice2x/games/ccj/ccj.cpp b/src/spice2x/games/ccj/ccj.cpp index 5a825d3..9ac910e 100644 --- a/src/spice2x/games/ccj/ccj.cpp +++ b/src/spice2x/games/ccj/ccj.cpp @@ -65,6 +65,10 @@ namespace games::ccj { libutils::load_library("libaio-iob2_video.dll"); libutils::load_library("win10actlog.dll"); + // we do this to prevent this unexpectedly being unloaded + // which leads to D3D10Warp.dll_unloaded crash + libutils::load_library("d3d10warp.dll"); + detour::trampoline_try("execexe.dll", MAKEINTRESOURCE(11), (void*)execexe_CreateFileW_hook,(void**)&execexe_CreateFileW_orig);