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

Fix access violation when ResizeBuffers() is called early #8

Closed NotNite closed 4 months ago

NotNite commented 4 months ago

Related issue: #7

Some games (like modern GameMaker) resize the window before the DX11 backend is initialized. ImGui does not null check the backend data in some spots, so we have to check if we've initialized before calling them. This is an upstream ImGui issue and this is just a workaround for it. Whether it is considered invalid behavior by them is unknown. This might also happen on DX9, but I don't have a game to test it with.

Sorry about the random whitespace changes, that was Rider being mystical and magical.

Sewer56 commented 4 months ago

Gimme a moment I'll get a package release sorted.

Sewer56 commented 4 months ago

Uploaded to NuGet, should be live in next few minutes.