From 9e299c295dc94ca6f1d813f1b974e40de901f369 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Tue, 5 Mar 2024 22:32:06 -0600 Subject: [PATCH] Fix predefined FPS values not taking effect --- src/config.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/config.cpp b/src/config.cpp index ba2718aca7f..21562f83487 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -849,6 +849,11 @@ namespace config { std::vector list; list_string_f(vars, name, list); + // check if list is empty, i.e. when the value doesn't exist in the config file + if (list.empty()) { + return; + } + // The framerate list must be cleared before adding values from the file configuration. // If the list is not cleared, then the specified parameters do not affect the behavior of the sunshine server. // That is, if you set only 30 fps in the configuration file, it will not work because by default, during initialization the list includes 10, 30, 60, 90 and 120 fps.