From 9fe4b959ac90c91185ea0974f9a4d16091b0d3aa Mon Sep 17 00:00:00 2001 From: rubidium Date: Wed, 24 Aug 2011 12:11:10 +0000 Subject: (svn r22818) -Fix [FS#4742] (r22796, rlongago): don't spawn threads for world generation and NewGRF scanning when using the dedicated or null video driver regardless of the used blitter --- src/genworld.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/genworld.cpp') diff --git a/src/genworld.cpp b/src/genworld.cpp index 151abc2b9..02d9cab05 100644 --- a/src/genworld.cpp +++ b/src/genworld.cpp @@ -24,7 +24,7 @@ #include "engine_func.h" #include "newgrf_storage.h" #include "water.h" -#include "blitter/factory.hpp" +#include "video/video_driver.hpp" #include "tilehighlight_func.h" #include "saveload/saveload.h" #include "void_map.h" @@ -310,8 +310,7 @@ void GenerateWorld(GenWorldMode mode, uint size_x, uint size_y, bool reset_setti _gw.thread = NULL; } - if (BlitterFactoryBase::GetCurrentBlitter()->GetScreenDepth() == 0 || - !ThreadObject::New(&_GenerateWorld, NULL, &_gw.thread)) { + if (!_video_driver->HasGUI() || !ThreadObject::New(&_GenerateWorld, NULL, &_gw.thread)) { DEBUG(misc, 1, "Cannot create genworld thread, reverting to single-threaded mode"); _gw.threaded = false; _modal_progress_work_mutex->EndCritical(); -- cgit v1.2.3-54-g00ecf