summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2016-08-15 12:25:47 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-08-15 12:28:04 +0300
commite04bbf938ce258898565274b8542684295ee6cd4 (patch)
treea57f457333ea8a520eb10f0b70dedf15a88a8422 /utils
parent4780d98bfde87f03754c0e0e2fabe68d02958df9 (diff)
support finding fractional vrefresh
Diffstat (limited to 'utils')
-rw-r--r--utils/testpat.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/testpat.cpp b/utils/testpat.cpp
index 4cde7c1..ccddccb 100644
--- a/utils/testpat.cpp
+++ b/utils/testpat.cpp
@@ -102,7 +102,7 @@ static void get_default_crtc(Card& card, OutputInfo& output)
static void parse_crtc(Card& card, const string& crtc_str, OutputInfo& output)
{
// @12:1920x1200@60
- const regex mode_re("(?:(@?)(\\d+):)?(?:(\\d+)x(\\d+)(i)?)(?:@(\\d+))?");
+ const regex mode_re("(?:(@?)(\\d+):)?(?:(\\d+)x(\\d+)(i)?)(?:@([\\d\\.]+))?");
smatch sm;
if (!regex_match(crtc_str, sm, mode_re))
@@ -133,7 +133,7 @@ static void parse_crtc(Card& card, const string& crtc_str, OutputInfo& output)
unsigned w = stoul(sm[3]);
unsigned h = stoul(sm[4]);
bool ilace = sm[5].matched ? true : false;
- unsigned refresh = sm[6].matched ? stoul(sm[6]) : 0;
+ float refresh = sm[6].matched ? stof(sm[6]) : 0;
bool found_mode = false;