openttd.c
changeset 2383 7589e75b873a
parent 2380 392bba57462d
child 2395 d1629f64d157
equal deleted inserted replaced
2382:a66af7211f95 2383:7589e75b873a
   551 
   551 
   552 /** Called by running thread to execute some action in the main game.
   552 /** Called by running thread to execute some action in the main game.
   553  * It will stall as long as the mutex is not freed (handled) by the game */
   553  * It will stall as long as the mutex is not freed (handled) by the game */
   554 void OTTD_SendThreadMessage(ThreadMsg msg)
   554 void OTTD_SendThreadMessage(ThreadMsg msg)
   555 {
   555 {
       
   556 	if (_exit_game) return;
   556 	while (_message != 0) CSleep(10);
   557 	while (_message != 0) CSleep(10);
   557 
   558 
   558 	_message = msg;
   559 	_message = msg;
   559 }
   560 }
   560 
   561