Skip to content

Commit 367041f

Browse files
author
fooDayuyu@gmail.com
committed
Fix first component installation configuration reset
1 parent 31f8092 commit 367041f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

conf.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ conf_string_entry make_conf_entry(int i, const pfc::string8 &v) {
4242
bool new_conf::load() {
4343
bool changed = false;
4444
// { specs vector, boolvals, intvals, stringvals;
45+
vspec v000 { &vec_specs, 0, 0, 0 };
4546
vspec v199 { &vec_specs, 25, 16, 13 };
4647
vspec v200 { &vec_specs, 27, 22, 14 };
4748
vspec v201 { &vec_specs, 28, 28, 14 };
@@ -52,19 +53,18 @@ bool new_conf::load() {
5253
vspec vLoad = { nullptr, cfg_bool_entries.get_count(),
5354
cfg_int_entries.get_count(), cfg_string_entries.get_count() };
5455

55-
if (vLoad > *vlast) {
56+
if (!(vLoad == v000) && vLoad > *vlast) {
5657
//version not found
5758
//safety reset
59+
vLoad = *vlast;
5860
pfc::string8 title;
59-
title << "Problem updating foo_discogs configuration";
60-
pfc::string8 msg("The configuration will be reset\n");
61-
msg << "Do not close this dialog and backup your setting\n";
62-
msg << "before continuing.";
63-
return uMessageBox(core_api::get_main_window(), msg, title,
61+
title << "Configuration Reset";
62+
pfc::string8 msg("This version of foo_discogs is not compatible with the current setup.\n");
63+
msg << "Configuration will be reset.\n",
64+
msg << "Please backup your configuration file before continuing.\n",
65+
66+
uMessageBox(core_api::get_main_window(), msg, title,
6467
MB_APPLMODAL | MB_ICONASTERISK);
65-
new_conf reset_conf;
66-
reset_conf.save();
67-
return true;
6868
}
6969

7070
for (unsigned int i = 0; i < cfg_bool_entries.get_count(); i++) {

0 commit comments

Comments
 (0)