summaryrefslogtreecommitdiff
path: root/functions.h
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2005-06-01 23:08:33 +0000
committerDarkvater <Darkvater@openttd.org>2005-06-01 23:08:33 +0000
commit13c7b2b3376c36e77425550244ff5f33b923449f (patch)
treec3ceb927825435dc686caebd0cf953aefc9b7aa7 /functions.h
parent2f1a224ea9ff26a3633c1ce2aba427538c3a0d06 (diff)
downloadopenttd-13c7b2b3376c36e77425550244ff5f33b923449f.tar.xz
(svn r2391) - Feature: saving games happen in a seperate thread so you no longer will have to wait such a long time (especially handy on bigger maps and multiplayer games). The mouse also changes into the 'ZZZ' state :P. The thread on windows is currently given a little-bit-less-than-normal priority so it should not interfere that much with the gameplay; it will take a bit longer though. Upon the exit of the game any pending saves are waited upon.
- Fix: fixed GetSavegameFormat() so that it takes the best compressor (highest), or a forced one added with the parameter - Open issues: 1. Don't attempt to load a game while saving is in progress, it will kick you back to the intro-screen with only the vast ocean to look at. 2. The server is disabled from threaded-saving, but might be enabled in the future. 3. Current implementation only allows 1 additional running thread. 4. Stupid global variables.....grrr Big thanks for TrueLight and the amazing memorypool :D
Diffstat (limited to 'functions.h')
-rw-r--r--functions.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/functions.h b/functions.h
index 5d51619fe..40604e295 100644
--- a/functions.h
+++ b/functions.h
@@ -266,4 +266,7 @@ void DeterminePaths(void);
char * CDECL str_fmt(const char *str, ...);
void bubblesort(void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *));
+bool CreateOTTDThread(void *func, void *param);
+void CloseOTTDThread(void);
+void JoinOTTDThread(void);
#endif /* FUNCTIONS_H */