Fix Prelaunch Break-out (#738)

- Prevent users from breaking out of the prelaunch menu through the GraphicsTuner pages
This commit is contained in:
SuperDude88
2026-05-09 15:37:14 -04:00
committed by GitHub
parent 2f83753260
commit d0b9b6d10f
3 changed files with 14 additions and 11 deletions
+5 -3
View File
@@ -193,9 +193,10 @@ Rml::String format_graphics_setting_value(GraphicsOption option, int value) {
return "";
}
GraphicsTuner::GraphicsTuner(GraphicsTunerProps props)
GraphicsTuner::GraphicsTuner(GraphicsTunerProps props, bool prelaunch)
: Document(kDocumentSource), mOption(props.option), mValueMin(props.valueMin),
mValueMax(props.valueMax), mDefaultValue(props.defaultValue) {
mValueMax(props.valueMax), mDefaultValue(props.defaultValue), mPrelaunch(prelaunch)
{
if (mDocument == nullptr) {
return;
}
@@ -281,7 +282,8 @@ bool GraphicsTuner::handle_nav_command(Rml::Event& event, NavCommand cmd) {
pop();
return true;
}
return Document::handle_nav_command(event, cmd);
return mPrelaunch ? false : Document::handle_nav_command(event, cmd);
}
void GraphicsTuner::reset_default() {