diff options
Diffstat (limited to 'src/newgrf_config.cpp')
-rw-r--r-- | src/newgrf_config.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/newgrf_config.cpp b/src/newgrf_config.cpp index c7a4f01b0..6bdf5117d 100644 --- a/src/newgrf_config.cpp +++ b/src/newgrf_config.cpp @@ -92,7 +92,12 @@ const char *GRFConfig::GetDescription() const */ void GRFConfig::SetSuitablePalette() { - PaletteType pal = _use_palette; + PaletteType pal; + 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; + } SB(this->palette, GRFP_USE_BIT, 1, pal == PAL_WINDOWS ? GRFP_USE_WINDOWS : GRFP_USE_DOS); } |