Codechange: use the shortname as unique id to identify the base graphics in openttd.cfg.

This commit is contained in:
frosch
2023-10-02 14:17:32 +02:00
committed by frosch
parent 97df27e41f
commit 0b7ecf6102
6 changed files with 62 additions and 16 deletions

View File

@@ -693,7 +693,7 @@ struct GameOptionsWindow : Window {
case WID_GO_BASE_GRF_DROPDOWN:
if (_game_mode == GM_MENU) {
auto* set = BaseGraphics::GetSet(index);
BaseGraphics::SetSet(set->name);
BaseGraphics::SetSet(set);
this->reload = true;
this->InvalidateData();
}
@@ -703,7 +703,7 @@ struct GameOptionsWindow : Window {
if (_game_mode == GM_MENU) {
auto* set = BaseSounds::GetSet(index);
BaseSounds::ini_set = set->name;
BaseSounds::SetSet(set->name);
BaseSounds::SetSet(set);
this->reload = true;
this->InvalidateData();
}