summaryrefslogtreecommitdiff
path: root/src/newgrf_config.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-08-24 12:11:10 +0000
committerrubidium <rubidium@openttd.org>2011-08-24 12:11:10 +0000
commit9fe4b959ac90c91185ea0974f9a4d16091b0d3aa (patch)
treeb37424d61a55f93d00cf4b385a28d0842ecc53aa /src/newgrf_config.cpp
parentfde0b4ce146455b4e5a4487973c21908485dba8c (diff)
downloadopenttd-9fe4b959ac90c91185ea0974f9a4d16091b0d3aa.tar.xz
(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
Diffstat (limited to 'src/newgrf_config.cpp')
-rw-r--r--src/newgrf_config.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/newgrf_config.cpp b/src/newgrf_config.cpp
index c8385aca4..693339182 100644
--- a/src/newgrf_config.cpp
+++ b/src/newgrf_config.cpp
@@ -19,8 +19,7 @@
#include "window_func.h"
#include "progress.h"
#include "thread/thread.h"
-#include "blitter/factory.hpp"
-#include "network/network.h"
+#include "video/video_driver.hpp"
#include "fileio_func.h"
#include "fios.h"
@@ -696,7 +695,7 @@ void DoScanNewGRFFiles(void *callback)
*/
void ScanNewGRFFiles(NewGRFScanCallback *callback)
{
- if (BlitterFactoryBase::GetCurrentBlitter()->GetScreenDepth() == 0 || _network_dedicated || !ThreadObject::New(&DoScanNewGRFFiles, callback, NULL)) {
+ if (!_video_driver->HasGUI() || !ThreadObject::New(&DoScanNewGRFFiles, callback, NULL)) {
_modal_progress_work_mutex->EndCritical();
_modal_progress_paint_mutex->EndCritical();
DoScanNewGRFFiles(callback);