mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-28 01:03:10 -04:00
Fix Prelaunch Break-out (#738)
- Prevent users from breaking out of the prelaunch menu through the GraphicsTuner pages
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user