mirror of
https://github.com/PancakeTAS/lsfg-vk.git
synced 2025-10-30 07:01:10 +00:00
allow hot-reload via multiplier=1
This commit is contained in:
parent
a9ccddd972
commit
1f8e3222d3
1 changed files with 14 additions and 4 deletions
|
|
@ -220,9 +220,14 @@ bool Config::updateConfig(const std::string& file) {
|
||||||
.valid = globalConf.valid // use the same validity flag
|
.valid = globalConf.valid // use the same validity flag
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (global.multiplier == 1) { // jank alarm
|
||||||
|
global.enable = false;
|
||||||
|
global.multiplier = 2;
|
||||||
|
}
|
||||||
|
|
||||||
// validate global configuration
|
// validate global configuration
|
||||||
if (global.multiplier < 2)
|
if (global.multiplier < 1)
|
||||||
throw std::runtime_error("Multiplier cannot be less than 2");
|
throw std::runtime_error("Multiplier cannot be less than 1");
|
||||||
if (global.flowScale < 0.25F || global.flowScale > 1.0F)
|
if (global.flowScale < 0.25F || global.flowScale > 1.0F)
|
||||||
throw std::runtime_error("Flow scale must be between 0.25 and 1.0");
|
throw std::runtime_error("Flow scale must be between 0.25 and 1.0");
|
||||||
|
|
||||||
|
|
@ -247,9 +252,14 @@ bool Config::updateConfig(const std::string& file) {
|
||||||
.valid = global.valid // only need a single validity flag
|
.valid = global.valid // only need a single validity flag
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (game.multiplier == 1) {
|
||||||
|
game.enable = false;
|
||||||
|
game.multiplier = 2;
|
||||||
|
}
|
||||||
|
|
||||||
// validate the configuration
|
// validate the configuration
|
||||||
if (game.multiplier < 2)
|
if (game.multiplier < 1)
|
||||||
throw std::runtime_error("Multiplier cannot be less than 2");
|
throw std::runtime_error("Multiplier cannot be less than 1");
|
||||||
if (game.flowScale < 0.25F || game.flowScale > 1.0F)
|
if (game.flowScale < 0.25F || game.flowScale > 1.0F)
|
||||||
throw std::runtime_error("Flow scale must be between 0.25 and 1.0");
|
throw std::runtime_error("Flow scale must be between 0.25 and 1.0");
|
||||||
games[exe] = std::move(game);
|
games[exe] = std::move(game);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue