From eb443e751f4ccdcea2272ed4bc7fed919be0a316 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Wed, 5 Mar 2025 14:25:13 +0100 Subject: [PATCH] sculpt: support disabling connector manually via config/fb Fix #5478 --- repos/gems/src/app/sculpt_manager/model/fb_config.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/repos/gems/src/app/sculpt_manager/model/fb_config.h b/repos/gems/src/app/sculpt_manager/model/fb_config.h index 2d2f346e06..3faec98484 100644 --- a/repos/gems/src/app/sculpt_manager/model/fb_config.h +++ b/repos/gems/src/app/sculpt_manager/model/fb_config.h @@ -53,11 +53,19 @@ struct Sculpt::Fb_config static Entry from_manual_xml(Xml_node const &node) { + auto mode_id = node.attribute_value("mode", Mode_id()); + auto mode_attr = Mode_attr::from_xml(node); + + if (!node.attribute_value("enabled", true)) { + mode_id = { }; + mode_attr = { }; + } + return { .defined = true, .present = false, .name = node.attribute_value("name", Name()), - .mode_id = node.attribute_value("mode", Mode_id()), - .mode_attr = Mode_attr::from_xml(node), + .mode_id = mode_id, + .mode_attr = mode_attr, .brightness = Brightness::from_xml(node) }; }