[ExtMFD] Fix ExtMFD size amnesia#663
Open
EvESpirit wants to merge 1 commit into
Open
Conversation
Contributor
|
Gave it a try, this is nice. Also since the position is saved, the layout is conserved too. |
TheGondos
reviewed
May 27, 2026
|
|
||
| static std::vector<bool> g_usedWindowIds; | ||
|
|
||
| int GetFreeWindowId() { |
| return g_usedWindowIds.size(); | ||
| } | ||
|
|
||
| void FreeWindowId(int id) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR fixes #355, an issue with ExtMFD from 3 years ago (sheesh). The core issues were actually two things:
While ImGuiCond_Once sounds like the correct flag, it just means something like "apply this rule the first time this code is executed per runtime session.". This obviously causes it to default out. The fix makes it so it only defaults if there's no saved size data for a specific window.
The second one was weird, basically the ImGui dialog's "name" was generated using the memory pointer of the MFDWindow instance - meaning that features like ASLR that are fairly standard these days force it to always think that it's a different window that needs a new name - so eventhough we save (after the first modification), we still are unable to retrieve the size info, so we default. I fixed this with a tiny and simple ID system for extmfd windows since that seemed like the easiest option.