forked from mirror/OpenTTD
(svn r2906) Fix some threaded saving problems. Now the thread only interfaces with the main program through a sort of mutex. Communication uses the function OTTD_SendThreadMessage() with the approiate message which is handled in ProcessSentMessage() during the main loop.
This commit is contained in:
11
openttd.h
11
openttd.h
@@ -543,4 +543,15 @@ enum {
|
||||
};
|
||||
VARDEF byte _no_scroll;
|
||||
|
||||
/** To have a concurrently running thread interface with the main program, use
|
||||
* the OTTD_SendThreadMessage() function. Actions to perform upon the message are handled
|
||||
* in the ProcessSentMessage() function */
|
||||
typedef enum ThreadMsgs {
|
||||
MSG_OTTD_SAVETHREAD_START = 1,
|
||||
MSG_OTTD_SAVETHREAD_DONE = 2,
|
||||
MSG_OTTD_SAVETHREAD_ERROR = 3,
|
||||
} ThreadMsg;
|
||||
|
||||
void OTTD_SendThreadMessage(ThreadMsg msg);
|
||||
|
||||
#endif /* OPENTTD_H */
|
||||
|
Reference in New Issue
Block a user