diff options
author | michi_cc <michi_cc@openttd.org> | 2011-10-04 21:35:47 +0000 |
---|---|---|
committer | michi_cc <michi_cc@openttd.org> | 2011-10-04 21:35:47 +0000 |
commit | c575b5bbd7c8a225ff5a2b1120c58edfc96f078d (patch) | |
tree | ad19b7bddacec4ea1ecfd1dc62a418fb96273dad /src/openttd.cpp | |
parent | 6dbb050a32122209497d9b41c373b3b759602883 (diff) | |
download | openttd-c575b5bbd7c8a225ff5a2b1120c58edfc96f078d.tar.xz |
(svn r23000) -Feature: Base graphics sets can now specify a preferred blitter which OpenTTD uses to decide which blitter to load.
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r-- | src/openttd.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp index af1f77f4e..1f63fe558 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -647,10 +647,14 @@ int ttd_main(int argc, char *argv[]) DEBUG(misc, 1, "Loading blitter..."); if (blitter == NULL && _ini_blitter != NULL) blitter = strdup(_ini_blitter); - if (BlitterFactoryBase::SelectBlitter(blitter) == NULL) { - StrEmpty(blitter) ? - usererror("Failed to autoprobe blitter") : - usererror("Failed to select requested blitter '%s'; does it exist?", blitter); + _blitter_autodetected = StrEmpty(blitter); + /* If we have a 32 bpp base set, try to select the 32 bpp blitter first, but only if we autoprobe the blitter. */ + if (!_blitter_autodetected || BaseGraphics::GetUsedSet()->blitter == BLT_8BPP || BlitterFactoryBase::SelectBlitter("32bpp-anim") == NULL) { + if (BlitterFactoryBase::SelectBlitter(blitter) == NULL) { + StrEmpty(blitter) ? + usererror("Failed to autoprobe blitter") : + usererror("Failed to select requested blitter '%s'; does it exist?", blitter); + } } free(blitter); |