| 3 | #include "cube.h" |
| 4 | |
| 5 | void cleanup(char *msg) // single program exit point; |
| 6 | { |
| 7 | if(clientlogfile) clientlogfile->fflush(); |
| 8 | if(!msg) |
| 9 | { |
| 10 | cleanupclient(); |
| 11 | audiomgr.soundcleanup(); |
| 12 | cleanupserver(); |
| 13 | } |
| 14 | SDL_ShowCursor(SDL_TRUE); |
| 15 | SDL_SetRelativeMouseMode(SDL_FALSE); |
| 16 | if(msg) |
| 17 | { |
| 18 | #ifdef WIN32 |
| 19 | MessageBox(NULL, msg, "AssaultCube fatal error", MB_OK|MB_SYSTEMMODAL|MB_ICONERROR); |
| 20 | #else |
| 21 | printf("%s", msg); |
| 22 | #endif |
| 23 | if(clientlogfile) |
| 24 | { |
| 25 | clientlogfile->printf("%s\n", msg); |
| 26 | dumpexecutionstack(clientlogfile); |
| 27 | } |
| 28 | } |
| 29 | SDL_Quit(); |
| 30 | } |
| 31 | |
| 32 | VAR(resetcfg, 0, 0, 1); |
| 33 |
no test coverage detected