From 3b5cb272c0347ea92a4b47556d2b03c6921342fc Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Tue, 12 Jan 2021 00:24:16 +0100 Subject: [PATCH] Accept integer values for frame_rate --- src/common/configuration.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/common/configuration.cpp b/src/common/configuration.cpp index 3b8f62d4..531177ae 100644 --- a/src/common/configuration.cpp +++ b/src/common/configuration.cpp @@ -99,6 +99,11 @@ Configuration::Configuration(const fs::path& config_path, } else if (key == "frame_rate") { if (const auto parsed_value = value.as_floating_point()) { frame_rate = parsed_value->get(); + } else if (const auto parsed_value = value.as_integer()) { + // For usability's sake we want to be a bit more lax than a + // normal TOML file would be and accept both floating point + // values and integers here + frame_rate = parsed_value->get(); } else { invalid_options.push_back(key); }