UPDATES: Fix saving the updates_check frequency in opt-in wizard

When ScummVM is started, if the updates_check value is not defined
in the config file and ScummVM was compiled with the Updates feature
(on macOS or Windows), an opt-in dialog asks the user if he wants
to check for available updates periodically. This should only be
shown once. However as ConfMan was not flushed to disk, it was
asked again the next time ScummVM is started, and again, until the
user accessed the options to change something else and this was
finally flushed to disk.
This commit is contained in:
Thierry Crozat 2023-05-25 22:20:43 +01:00
parent a2ac92d53e
commit 7b9ae88050

View File

@ -118,6 +118,7 @@ UpdatesDialog::UpdatesDialog() : Dialog(30, 20, 260, 124) {
void UpdatesDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
if (cmd == kProceedCmd) {
ConfMan.setInt("updates_check", _updatesPopUp->getSelectedTag());
ConfMan.flushToDisk();
if (g_system->getUpdateManager()) {
if (_updatesPopUp->getSelectedTag() == Common::UpdateManager::kUpdateIntervalNotSupported) {