fixed live

This commit is contained in:
chinosk
2025-04-27 15:50:38 +01:00
parent d09904643f
commit e859589125
8 changed files with 325 additions and 29 deletions
@@ -54,6 +54,8 @@ namespace GakumasLocal::Config {
float bLimitZx = 1.0f;
float bLimitZy = 1.0f;
bool dmmUnlockSize = false;
void LoadConfig(const std::string& configStr) {
try {
const auto config = nlohmann::json::parse(configStr);
@@ -102,6 +104,7 @@ namespace GakumasLocal::Config {
GetConfigItem(bLimitYy);
GetConfigItem(bLimitZx);
GetConfigItem(bLimitZy);
GetConfigItem(dmmUnlockSize);
}
catch (std::exception& e) {
Log::ErrorFmt("LoadConfig error: %s", e.what());
@@ -157,6 +160,7 @@ namespace GakumasLocal::Config {
SetConfigItem(bLimitYy);
SetConfigItem(bLimitZx);
SetConfigItem(bLimitZy);
SetConfigItem(dmmUnlockSize);
std::ofstream out(configPath);
if (!out) {
@@ -51,6 +51,8 @@ namespace GakumasLocal::Config {
extern float bLimitZx;
extern float bLimitZy;
extern bool dmmUnlockSize;
void LoadConfig(const std::string& configStr);
void SaveConfig(const std::string& configPath);
}