[dxvk] Use from_chars to parse frame rate limit

For some reason, this is locale-independent by default while stod is not.
This commit is contained in:
Philip Rebohle 2023-08-07 13:01:01 +02:00
parent 87483ed483
commit 1c73f4018b
1 changed files with 4 additions and 1 deletions

View File

@ -1,3 +1,4 @@
#include <charconv>
#include <thread>
#include "thread.h"
@ -17,7 +18,9 @@ namespace dxvk {
if (!env.empty()) {
try {
setTargetFrameRate(std::stod(env));
double f = 0.0f;
std::from_chars(env.data(), env.data() + env.size(), f);
setTargetFrameRate(f);
m_envOverride = true;
} catch (const std::invalid_argument&) {
// no-op