Sewer56 / Reloaded.Imgui.Hook

A simple personal use utility library that can be used to inject Dear Imgui into the current process.
MIT License
19 stars 5 forks source link

Initialize ImguiHookDx11 Instance singleton earlier #1

Closed 12354 closed 2 years ago

12354 commented 2 years ago

While injecting into unsuspended processes, the hook implementation(=> Instance.PresentImpl) sometimes crashed for me, because Instance was not set yet.

Moving the singleton initialisation above the hooks fixes this problem.

Sewer56 commented 2 years ago

Looks Good To Me 👌 Seems this is an oversight I made when modularising out the code and minimizing transition overhead with UnmanagedCallersOnly.

DX9 needs the same fix too, lemme test quickly with the PR and push out patched packages.

Sewer56 commented 2 years ago

Okay, should be good. Pushed the updated packages upstream; should be available in around 10 minutes once NuGet validates them.