[N64] Fix pak menu radio selection#2307
Merged
LukeUsher merged 1 commit intoares-emulator:masterfrom Dec 9, 2025
Merged
Conversation
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 became a problem when changes were made to introduce support for the biosensor pak item, which when chosen adds an additional BPM menu item option to the parent menu, and removes it when a different pak (or nothing) is selected. Previously menu selection would be resolved at the end of the method, but this had to be removed or the removal of the BPM menu wouldn't work correctly.
The underlying issue was the way in which we created menu radio items in the pak menu. By creating them, setting them up, and then adding them to the group one by one, each created menu radio item had its default checked state set to true as they were currently not part of a group. This led to every item in the pak menu having their checked state set to true, which broke proper radio selection. By creating all menu items at once and adding them all into the appropriate group, the logic that follows to determine which one should be checked will now properly enable the correct menu item while disabling all other items in the group.