mirror of
https://git.chinosk6.cn/chinosk/gkms-local.git
synced 2026-06-19 15:56:02 +07:00
fixed live
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user