mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-02 07:26:00 +01:00
fix device sections shadowing parse errors
This commit is contained in:
parent
3914672dd5
commit
ad03360665
1 changed files with 8 additions and 10 deletions
|
@ -159,17 +159,15 @@ void CConfigManager::init() {
|
||||||
|
|
||||||
void CConfigManager::configSetValueSafe(const std::string& COMMAND, const std::string& VALUE) {
|
void CConfigManager::configSetValueSafe(const std::string& COMMAND, const std::string& VALUE) {
|
||||||
if (configValues.find(COMMAND) == configValues.end()) {
|
if (configValues.find(COMMAND) == configValues.end()) {
|
||||||
if (COMMAND[0] == '$') {
|
if (COMMAND.find("device:") != 0 /* devices parsed later */) {
|
||||||
// register a dynamic var
|
if (COMMAND[0] == '$') {
|
||||||
Debug::log(LOG, "Registered dynamic var \"%s\" -> %s", COMMAND.c_str(), VALUE.c_str());
|
// register a dynamic var
|
||||||
configDynamicVars[COMMAND.substr(1)] = VALUE;
|
Debug::log(LOG, "Registered dynamic var \"%s\" -> %s", COMMAND.c_str(), VALUE.c_str());
|
||||||
} else {
|
configDynamicVars[COMMAND.substr(1)] = VALUE;
|
||||||
parseError = "Error setting value <" + VALUE + "> for field <" + COMMAND + ">: No such field.";
|
} else {
|
||||||
}
|
parseError = "Error setting value <" + VALUE + "> for field <" + COMMAND + ">: No such field.";
|
||||||
|
}
|
||||||
|
|
||||||
if (COMMAND.find("device:") == 0 /* devices parsed later */) {
|
|
||||||
parseError = "";
|
|
||||||
} else {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue