perfect: Free memory when Perfact AI disabled

This commit is contained in:
Calcitem 2021-01-24 01:50:49 +08:00
parent 40827fd79d
commit 6587042634
1 changed files with 5 additions and 1 deletions

View File

@ -596,7 +596,11 @@ void Game::setPerfectAi(bool enabled)
gameOptions.setPerfectAiEnabled(enabled);
settings->setValue("Options/PerfectAI", enabled);
perfect_reset();
if (enabled) {
perfect_reset();
} else {
perfect_exit();
}
}
void Game::setIDS(bool enabled)