From 7b7ce638f41e706ca24147d680ff16b55d4f2dd0 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sat, 19 Mar 2022 21:46:29 +0100 Subject: refresh rates --- src/config/ConfigManager.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/config/ConfigManager.cpp') diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 319d0303..24195991 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -112,7 +112,10 @@ void CConfigManager::handleMonitor(const std::string& command, const std::string nextItem(); newrule.resolution.x = stoi(curitem.substr(0, curitem.find_first_of('x'))); - newrule.resolution.y = stoi(curitem.substr(curitem.find_first_of('x') + 1)); + newrule.resolution.y = stoi(curitem.substr(curitem.find_first_of('x') + 1, curitem.find_first_of('@'))); + + if (curitem.find_first_of('@') != std::string::npos) + newrule.refreshRate = stof(curitem.substr(curitem.find_first_of('@') + 1)); nextItem(); -- cgit v1.2.3