diff --git a/src/xenia/base/cvar.h b/src/xenia/base/cvar.h index 6047b1bd8..1f92d0766 100644 --- a/src/xenia/base/cvar.h +++ b/src/xenia/base/cvar.h @@ -15,8 +15,9 @@ #include #include -#include "cpptoml/include/cpptoml.h" -#include "cxxopts/include/cxxopts.hpp" +#include "third_party/cpptoml/include/cpptoml.h" +#include "third_party/cxxopts/include/cxxopts.hpp" +#include "third_party/fmt/include/fmt/format.h" #include "xenia/base/assert.h" #include "xenia/base/filesystem.h" #include "xenia/base/string_util.h" @@ -216,7 +217,10 @@ inline std::string CommandVar::ToString( template std::string CommandVar::ToString(T val) { - return std::to_string(val); + // Use fmt::format instead of std::to_string for locale-neutral formatting of + // floats, always with a period rather than a comma, which is treated as an + // unidentified trailing character by cpptoml. + return fmt::format("{}", val); } template