mirror of
https://github.com/gwdevhub/gMod.git
synced 2026-07-16 15:39:31 +00:00
2705ceda7b
RegisterExistingDevice deduped against D3D9Hooks.cpp's own g_devices map, but the cold Direct3DCreate9(Ex) path (D3D9Wrappers.cpp) never touches that map. If gMod is early-injected and something (e.g. GWToolbox adopting a pre-loaded gMod) also calls SetDevice on the resulting wrapper device, RegisterExistingDevice would treat it as new: MinHook-patch the wrapper's own vtable on top, and construct a second TextureClient, hitting its single-instance ASSERT. Check TextureClient::CurrentClient() first so any already-active device (via either path) is a no-op.