mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-25 23:46:00 +01:00
parent
ed7cefdd3a
commit
5e50412dc0
1 changed files with 12 additions and 6 deletions
|
@ -1706,8 +1706,13 @@ std::optional<std::string> CConfigManager::handleMonitor(const std::string& comm
|
||||||
newrule.resolution.x = stoi(ARGS[1].substr(0, ARGS[1].find_first_of('x')));
|
newrule.resolution.x = stoi(ARGS[1].substr(0, ARGS[1].find_first_of('x')));
|
||||||
newrule.resolution.y = stoi(ARGS[1].substr(ARGS[1].find_first_of('x') + 1, ARGS[1].find_first_of('@')));
|
newrule.resolution.y = stoi(ARGS[1].substr(ARGS[1].find_first_of('x') + 1, ARGS[1].find_first_of('@')));
|
||||||
|
|
||||||
if (ARGS[1].contains("@"))
|
if (ARGS[1].contains("@")) {
|
||||||
|
try {
|
||||||
newrule.refreshRate = stof(ARGS[1].substr(ARGS[1].find_first_of('@') + 1));
|
newrule.refreshRate = stof(ARGS[1].substr(ARGS[1].find_first_of('@') + 1));
|
||||||
|
} catch (...) {
|
||||||
|
return "invalid argument for framerate";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1821,7 +1826,8 @@ std::optional<std::string> CConfigManager::handleBezier(const std::string& comma
|
||||||
const auto ARGS = CVarList(args);
|
const auto ARGS = CVarList(args);
|
||||||
|
|
||||||
std::string bezierName = ARGS[0];
|
std::string bezierName = ARGS[0];
|
||||||
if (ARGS[1] == "" || ARGS[2] == "" || ARGS[3] == "" || ARGS[4] == "")
|
|
||||||
|
if (ARGS.size() < 5)
|
||||||
return "too few arguments";
|
return "too few arguments";
|
||||||
if (ARGS[5]!= "")
|
if (ARGS[5]!= "")
|
||||||
return "too many arguments";
|
return "too many arguments";
|
||||||
|
|
Loading…
Reference in a new issue