(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
This commit is contained in:
@@ -29,6 +29,7 @@ public:
|
||||
|
||||
/* virtual */ bool ToggleFullscreen(bool fullscreen);
|
||||
/* virtual */ const char *GetName() const { return "dedicated"; }
|
||||
/* virtual */ bool HasGUI() const { return false; }
|
||||
};
|
||||
|
||||
/** Factory for the dedicated server video driver. */
|
||||
|
@@ -32,6 +32,7 @@ public:
|
||||
|
||||
/* virtual */ bool ToggleFullscreen(bool fullscreen);
|
||||
/* virtual */ const char *GetName() const { return "null"; }
|
||||
/* virtual */ bool HasGUI() const { return false; }
|
||||
};
|
||||
|
||||
/** Factory the null video driver. */
|
||||
|
@@ -46,6 +46,19 @@ public:
|
||||
* @return True if the change succeeded.
|
||||
*/
|
||||
virtual bool ToggleFullscreen(bool fullscreen) = 0;
|
||||
|
||||
/**
|
||||
* Whether the driver has a graphical user interface with the end user.
|
||||
* Or in other words, whether we should spawn a thread for world generation
|
||||
* and NewGRF scanning so the graphical updates can keep coming. Otherwise
|
||||
* progress has to be shown on the console, which uses by definition another
|
||||
* thread/process for display purposes.
|
||||
* @return True for all drivers except null and dedicated.
|
||||
*/
|
||||
virtual bool HasGUI() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
/** Base of the factory for the video drivers. */
|
||||
|
Reference in New Issue
Block a user