preferences: Adjust show_deprecation default to coincide with usage

This commit is contained in:
Tommy 2022-07-16 13:42:14 +12:00 committed by Pentarctagon
parent 641c69fdea
commit 1283348077

View file

@ -15,6 +15,7 @@
#include "preferences/advanced.hpp"
#include "game_config_view.hpp"
#include "game_version.hpp"
#include "gettext.hpp"
#include "log.hpp"
@ -39,6 +40,15 @@ advanced_manager::advanced_manager(const game_config_view& gc)
}
}
// show_deprecation has a different default on the dev branch
if(game_config::wesnoth_version.is_dev_version()) {
for(option& op : prefs) {
if(op.field == "show_deprecation") {
op.cfg["default"] = true;
}
}
}
std::sort(prefs.begin(), prefs.end(),
[](const auto& lhs, const auto& rhs) { return translation::icompare(lhs.name, rhs.name) < 0; });
}