(svn r16220) -Fix [FS#2862]: possible crashes when quiting OpenTTD or forcing resizes/redraws of the screen during map generation
This commit is contained in:
@@ -16,6 +16,8 @@ enum {
|
||||
LG_TERRAGENESIS = 1, ///< TerraGenesis Perlin landscape generator
|
||||
|
||||
GENERATE_NEW_SEED = UINT_MAX, ///< Create a new random seed
|
||||
|
||||
GENWORLD_REDRAW_TIMEOUT = 200, ///< Timeout between redraws
|
||||
};
|
||||
|
||||
/* Modes for GenerateWorld */
|
||||
@@ -32,7 +34,6 @@ typedef void gw_abort_proc();
|
||||
struct gw_info {
|
||||
bool active; ///< Is generating world active
|
||||
bool abort; ///< Whether to abort the thread ASAP
|
||||
bool wait_for_draw; ///< Are we waiting on a draw event
|
||||
bool quit_thread; ///< Do we want to quit the active thread
|
||||
bool threaded; ///< Whether we run _GenerateWorld threaded
|
||||
GenerateWorldMode mode;///< What mode are we making a world in
|
||||
@@ -69,8 +70,6 @@ static inline bool IsGeneratingWorld()
|
||||
}
|
||||
|
||||
/* genworld.cpp */
|
||||
void SetGeneratingWorldPaintStatus(bool status);
|
||||
bool IsGeneratingWorldReadyForPaint();
|
||||
bool IsGenerateWorldThreaded();
|
||||
void GenerateWorldSetCallback(gw_done_proc *proc);
|
||||
void GenerateWorldSetAbortCallback(gw_abort_proc *proc);
|
||||
@@ -89,4 +88,7 @@ void StartNewGameWithoutGUI(uint seed);
|
||||
void ShowCreateScenario();
|
||||
void StartScenarioEditor();
|
||||
|
||||
extern class ThreadMutex *_genworld_mapgen_mutex;
|
||||
extern class ThreadMutex *_genworld_paint_mutex;
|
||||
|
||||
#endif /* GENWORLD_H */
|
||||
|
Reference in New Issue
Block a user