Removed the core file path from the preferences.

The new implementation works with the id only.
This commit is contained in:
Fabian Müller 2014-11-07 06:26:25 +01:00
parent 42c9475173
commit d98240e4f6
3 changed files with 0 additions and 15 deletions

View File

@ -234,16 +234,6 @@ void set_allied_color(const std::string& color_id) {
prefs["ally_orb_color"] = color_id;
}
std::string wml_tree_root() {
std::string wml_tree_root = get("wml_tree_root");
if (wml_tree_root.empty())
return "_main.cfg";
return wml_tree_root;
}
void set_wml_tree_root(const std::string& wml_tree_root) {
prefs["wml_tree_root"] = wml_tree_root;
}
std::string core_id() {
std::string core_id = get("core");
if (core_id.empty())

View File

@ -55,9 +55,6 @@ namespace preferences {
config* get_prefs();
std::string wml_tree_root();
void set_wml_tree_root(const std::string& root);
std::string core_id();
void set_core_id(const std::string& root);

View File

@ -762,9 +762,7 @@ static int do_gameloop(const std::vector<std::string>& args)
gui2::tcore_selection core_dlg(cores, current);
if (core_dlg.show(game->disp().video())) {
int core_index = core_dlg.get_choice();
const std::string& wml_tree_root = cores[core_index]["path"];
const std::string& core_id = cores[core_index]["id"];
preferences::set_wml_tree_root(wml_tree_root);
preferences::set_core_id(core_id);
config_manager.reload_changed_game_config();
}