(svn r26522) -Add: A config-file-only setting to disable usage of 8bpp video modes.

-Remove: [win32] fullscreen_bpp setting, which is replaced by above setting.
-Change: Disable usage of 8bpp blitters and video modes by default. Many modern OS and hardware cause issues with those.
This commit is contained in:
frosch
2014-04-27 12:15:14 +00:00
parent 707ca990a9
commit b2c786ea68
9 changed files with 48 additions and 24 deletions

View File

@@ -238,16 +238,21 @@ static bool SwitchNewGRFBlitter()
/* Null driver => dedicated server => do nothing. */
if (BlitterFactory::GetCurrentBlitter()->GetScreenDepth() == 0) return false;
/* Get preferred depth. */
/* Get preferred depth.
* - depth_wanted_by_base: Depth required by the baseset, i.e. the majority of the sprites.
* - depth_wanted_by_grf: Depth required by some NewGRF.
* Both can force using a 32bpp blitter. depth_wanted_by_base is used to select
* between multiple 32bpp blitters, which perform differently with 8bpp sprites.
*/
uint depth_wanted_by_base = BaseGraphics::GetUsedSet()->blitter == BLT_32BPP ? 32 : 8;
uint depth_wanted_by_grf = 8;
uint depth_wanted_by_grf = _support8bpp == S8BPP_NONE ? 32 : 8;
for (GRFConfig *c = _grfconfig; c != NULL; c = c->next) {
if (c->status == GCS_DISABLED || c->status == GCS_NOT_FOUND || HasBit(c->flags, GCF_INIT_ONLY)) continue;
if (c->palette & GRFP_BLT_32BPP) depth_wanted_by_grf = 32;
}
/* Search the best blitter. */
struct {
static const struct {
const char *name;
uint animation; ///< 0: no support, 1: do support, 2: both
uint min_base_depth, max_base_depth, min_grf_depth, max_grf_depth;