diff options
author | Frederico Linhares <fred@linhares.blue> | 2022-08-08 11:12:51 -0300 |
---|---|---|
committer | Frederico Linhares <fred@linhares.blue> | 2022-08-08 11:12:51 -0300 |
commit | b8838794e135c1b849ac7a8638ca8e948042ef86 (patch) | |
tree | ac6e08d58a6c577d9a4d63e806474cd471bc557b /src/core.cpp | |
parent | ddbd513fc4a227420ed3475dfb6025ca6457334b (diff) |
refa Replace SDL timer with C++ timer
Diffstat (limited to 'src/core.cpp')
-rw-r--r-- | src/core.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core.cpp b/src/core.cpp index 30acbf9..a1c996f 100644 --- a/src/core.cpp +++ b/src/core.cpp @@ -54,6 +54,8 @@ vk_debug_callback( static void load_variables(void *obj) { + using namespace std::chrono; + YAML::Node root = YAML::LoadFile(cg_core.config_file); std::string game_name = root["name"].as<std::string>().c_str(); @@ -70,7 +72,8 @@ load_variables(void *obj) cg_core.game_version_patch = 0; cg_core.fps = 30; - cg_core.max_frame_duration_ms = 1000 / cg_core.fps; + cg_core.max_frame_duration = + duration<long long, std::milli>(1000 / cg_core.fps); } static void |