| 51 | } |
| 52 | |
| 53 | void dthread_start() |
| 54 | { |
| 55 | const char *error_buf; |
| 56 | |
| 57 | if (gbMaxPlayers == 1) { |
| 58 | return; |
| 59 | } |
| 60 | |
| 61 | sghWorkToDoEvent = StartEvent(); |
| 62 | if (!sghWorkToDoEvent) { |
| 63 | error_buf = TraceLastError(); |
| 64 | app_fatal("dthread:1\n%s", error_buf); |
| 65 | } |
| 66 | |
| 67 | dthread_running = TRUE; |
| 68 | |
| 69 | sghThread = CreateThread(dthread_handler, &glpDThreadId); |
| 70 | if (sghThread == NULL) { |
| 71 | error_buf = TraceLastError(); |
| 72 | app_fatal("dthread2:\n%s", error_buf); |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | unsigned int dthread_handler(void *) |
| 77 | { |
no test coverage detected