game: Always lock around ProcessCommands, even when unloading / disabling

This commit is contained in:
Jade Macho 2025-07-02 23:53:28 +02:00
parent 9ec966f6ff
commit 1b9d30af68
Signed by: 0x0ade
GPG key ID: E1960710FE4FBEEF

View file

@ -277,13 +277,6 @@ RR {dev->RequestRender} 0x{(long) dev->ImmediateContext->IfNonZeroSkipPostTickPr
private void ICDX11ProcessCommandsDetour(ImmediateContext* ctx, RenderCommandBufferGroup* cmds, uint count) private void ICDX11ProcessCommandsDetour(ImmediateContext* ctx, RenderCommandBufferGroup* cmds, uint count)
{ {
ref var cfg = ref Service.Config._.Game;
if (Service.Plugin.Unloading || !cfg.IsEnabled)
{
_icdx11ProcessCommandsHook.OriginalDisposeSafe(ctx, cmds, count);
return;
}
lock (_renderLock) lock (_renderLock)
{ {
_icdx11ProcessCommandsHook.OriginalDisposeSafe(ctx, cmds, count); _icdx11ProcessCommandsHook.OriginalDisposeSafe(ctx, cmds, count);