增加 fps 设置

This commit is contained in:
chinosk
2024-05-25 00:00:46 +08:00
parent 63d2c26e69
commit fb65a34684
8 changed files with 67 additions and 4 deletions
@@ -7,12 +7,14 @@ namespace GakumasLocal::Config {
bool enabled = true;
bool enableFreeCamera = false;
int targetFrameRate = 0;
void LoadConfig(const std::string& configStr) {
try {
const auto config = nlohmann::json::parse(configStr);
enabled = config["enabled"];
targetFrameRate = config["targetFrameRate"];
enableFreeCamera = config["enableFreeCamera"];
}
@@ -7,6 +7,7 @@ namespace GakumasLocal::Config {
extern bool enabled;
extern bool enableFreeCamera;
extern int targetFrameRate;
void LoadConfig(const std::string& configStr);
}