Skip to content

update dynamic menu visibility on config dialog close#470

Merged
Jamiras merged 1 commit intoRetroAchievements:developfrom
Jamiras:feature/core_opt_update_display
Mar 7, 2026
Merged

update dynamic menu visibility on config dialog close#470
Jamiras merged 1 commit intoRetroAchievements:developfrom
Jamiras:feature/core_opt_update_display

Conversation

@Jamiras
Copy link
Copy Markdown
Member

@Jamiras Jamiras commented Mar 3, 2026

Minimally addresses https://discord.com/channels/310192285306454017/353363923333808128/1227370418499883008

RETRO_ENVIRONMENT_SET_CORE_OPTIONS_UPDATE_DISPLAY_CALLBACK is designed to toggle the visibility of config options as the user changes values. However, that relies on the updated value being written back to the core, which RAlibretro only does if the user hits the OK button on the configuration dialog.

As such, we previously decided not to handle the callback at all. However, it's still desirable to pick up the menu visibility changes after the setting is applied in case the user reopens the configuration dialog. Previously, the user would have to reload the core to pick up the visibility changes.

This is still not an optimal solution as the hidden settings that should be visible based on changing another setting remain hidden until the dialog is closed and reopened. However, there's nothing in the libretro API that allows us to notify the core of an option change without actually changing the option. RetroArch doesn't have an OK/Cancel paradigm for changing values. Values are changed immediately and the only way to revert the change is to manually set the selection back to the previous value. We could potentially keep a ledger of all changes made while the dialog is open and roll them back if the user hits cancel, but the changes would still be immediately applied to the core, which is undesirable in the case where the user hits cancel.

@Jamiras Jamiras added this to the 1.8.3 milestone Mar 3, 2026
@Jamiras Jamiras merged commit 0a4df48 into RetroAchievements:develop Mar 7, 2026
6 checks passed
@Jamiras Jamiras deleted the feature/core_opt_update_display branch March 7, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant