Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COMMON: Allow meta engines to modify gui options #4278

wants to merge 2 commits into
base: master
Choose a base branch


Copy link

@athrxx athrxx commented Sep 19, 2022

This allows adding/removing gui options on the meta engine level.
After parsing the options from the config manager the meta engine can post process the options string as needed before the GUI gets to see it.

The second commit puts this to good use for the SCUMM engine by adding a default render mode to the options. My aim here is supporting PR #4223 . There, the default render modes do not get added to the detection tables so as to keep the table modifications to a minimum (= the VGA games don't have a VGA option, the EGA games don't have an EGA option, the Amiga games don't have an Amiga option, etc.). Instead, with this PR here, these default render modes get added by the meta engine.

This allows the meta engines to post process the gui options,
before they get to be used in the GUI. This allows adding or
removing options on a larger scale without having to modify
each detection entry individually. In this case, it is meant to be
used in the SCUMM engine, to allow adding render mode
gui options wothout modifying the tables.
// Clear this for platforms that don't have a specific render option (SegaCD, NES, ...)
defaultRenderOption = nullptr;
Copy link

@somaen somaen Sep 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO it's slightly more readable to initialize to nullptr initially, and then let the default here set VGA.

Copy link
Member Author

@athrxx athrxx Sep 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I have changed it...

@athrxx athrxx force-pushed the gui-options-render-modes branch from 94fb29d to ce748ae Compare Sep 21, 2022
Copy link

eriktorbjorn commented Sep 24, 2022

Since this pull request is based on a more recent Git snapshot, would it make sense to bring in the relevant bits from #4223 and continue that work here?

Copy link
Member Author

athrxx commented Sep 24, 2022

Yes, I guess it would make sense. These PRs kind of belong together...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
3 participants