| 183 | } |
| 184 | |
| 185 | bool waitForDF(bool nowait) { |
| 186 | DWORD df_pid = findDwarfFortressProcess(); |
| 187 | |
| 188 | if (df_pid == -1) |
| 189 | return false; |
| 190 | |
| 191 | if (nowait) |
| 192 | return true; |
| 193 | |
| 194 | HANDLE hDF = OpenProcess(PROCESS_QUERY_INFORMATION | SYNCHRONIZE, FALSE, df_pid); |
| 195 | |
| 196 | // in the future open an IPC connection so that we can proxy SteamAPI calls for the DFSteam module |
| 197 | |
| 198 | // this will eventually need to become a loop with a WaitForMultipleObjects call |
| 199 | WaitForSingleObject(hDF, INFINITE); |
| 200 | |
| 201 | CloseHandle(hDF); |
| 202 | |
| 203 | return true; |
| 204 | } |
| 205 | |
| 206 | #else |
| 207 |
no test coverage detected