summaryrefslogtreecommitdiff
path: root/src/openttd.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2014-04-27 12:15:14 +0000
committerfrosch <frosch@openttd.org>2014-04-27 12:15:14 +0000
commit631e8b45fd7bbd95766ee294304fad38dda946dc (patch)
tree67a68a8e68f7c7f05dd17d86071391e4fb778a37 /src/openttd.cpp
parent77889ab8e80653cb09cfc25b1d918b3562f1eab9 (diff)
downloadopenttd-631e8b45fd7bbd95766ee294304fad38dda946dc.tar.xz
(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.
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r--src/openttd.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 5f8ecc9ff..2d5b06e73 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -757,8 +757,15 @@ int openttd_main(int argc, char *argv[])
DEBUG(misc, 1, "Loading blitter...");
if (blitter == NULL && _ini_blitter != NULL) blitter = stredup(_ini_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() == NULL || BaseGraphics::GetUsedSet()->blitter == BLT_8BPP || BlitterFactory::SelectBlitter("32bpp-anim") == NULL) {
+ /* Activate the initial blitter.
+ * This is only some initial guess, after NewGRFs have been loaded SwitchNewGRFBlitter may switch to a different one.
+ * - Never guess anything, if the user specified a blitter. (_blitter_autodetected)
+ * - Use 32bpp blitter if baseset or 8bpp-support settings says so.
+ * - Use 8bpp blitter otherwise.
+ */
+ if (!_blitter_autodetected ||
+ (_support8bpp != S8BPP_NONE && (BaseGraphics::GetUsedSet() == NULL || BaseGraphics::GetUsedSet()->blitter == BLT_8BPP)) ||
+ BlitterFactory::SelectBlitter("32bpp-anim") == NULL) {
if (BlitterFactory::SelectBlitter(blitter) == NULL) {
StrEmpty(blitter) ?
usererror("Failed to autoprobe blitter") :