Fix overlay not working after alt-tabbing / playing steamworks #49
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Tested on DirectX12 enabled + fullscreen.
When alt-tabbing,
d3d12_deinitialize_imgui
which is called byd3d_resize_buffers_hook
gets called.In
d3d12_deinitialize_imgui
, it nullifiesm_d3d12_command_queue
and it always benullptr
after that.In Present hook, it checks if command queue is valid and also steamworks is not active.
If checks failed, it will return early but never assign back to
m_is_inside_present = false
.This will cause an issue as title says.
This PR fixes the issue by just keeping command queue when deinitializing and assigning the flag back properly.
I know nothing about DirectX or rendering stuff, so sorry if this is not a proper fix.