Rewrite menu code to track memory usage, prevent crashes and fix leaks #137
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.
The biggest paradigm change is that menus are now overriden from raw when the filesystem is reloaded during a UI_Init or CGameStart. They are no longer loaded on demand, they are always loaded when present.
Normally we should use menu lists (like
code.txt
) for this, it would be the correct approach.However this would instantly break decades of mods and servers, so right now I can't consider it. There's a little trick instead to make sure we only load stray menus when in game, and not in the main menu (where most would fail anyway), so mods that modify the main menu will have to have a menulist TXT somewhere to say what should be loaded and what shouldn't.