diff options
Diffstat (limited to 'src/newgrf_config.cpp')
-rw-r--r-- | src/newgrf_config.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/newgrf_config.cpp b/src/newgrf_config.cpp index 990cdde75..1cde3ab24 100644 --- a/src/newgrf_config.cpp +++ b/src/newgrf_config.cpp @@ -141,7 +141,7 @@ void GRFConfig::SetSuitablePalette() switch (this->palette & GRFP_GRF_MASK) { case GRFP_GRF_DOS: pal = PAL_DOS; break; case GRFP_GRF_WINDOWS: pal = PAL_WINDOWS; break; - default: pal = _use_palette; break; + default: pal = _settings_client.gui.newgrf_default_palette == 1 ? PAL_WINDOWS : PAL_DOS; break; } SB(this->palette, GRFP_USE_BIT, 1, pal == PAL_WINDOWS ? GRFP_USE_WINDOWS : GRFP_USE_DOS); } @@ -265,16 +265,16 @@ void GRFParameterInfo::SetValue(struct GRFConfig *config, uint32 value) /** * Update the palettes of the graphics from the config file. - * This is needed because the config file gets read and parsed - * before the palette is chosen (one can configure the base - * graphics set governing the palette in the config after all). - * As a result of this we update the settings from the config - * once we have determined the palette. + * Called when changing the default palette in advanced settings. + * @param p1 Unused. + * @return Always true. */ -void UpdateNewGRFConfigPalette() +bool UpdateNewGRFConfigPalette(int32 p1) { for (GRFConfig *c = _grfconfig_newgame; c != NULL; c = c->next) c->SetSuitablePalette(); for (GRFConfig *c = _grfconfig_static; c != NULL; c = c->next) c->SetSuitablePalette(); + for (GRFConfig *c = _all_grfs; c != NULL; c = c->next) c->SetSuitablePalette(); + return true; } /** |