Rev 77 | Rev 86 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 77 | Rev 79 | ||
|---|---|---|---|
| Line 85... | Line 85... | ||
| 85 | 85 | ||
| 86 | PlayerEngine_Shutdown (player); // on error, shutdown the engine |
86 | PlayerEngine_Shutdown (player); // on error, shutdown the engine |
| 87 | return (false); |
87 | return (false); |
| 88 | } |
88 | } |
| 89 | 89 | ||
| 90 | // wait for the engine process to display something (which will mean it's ready) |
90 | // wait for the engine process to display something (which will mean it's ready). Try for 5 seconds. |
| 91 | for (try_index = 0; try_index < |
91 | for (try_index = 0; try_index < 50; try_index++) |
| 92 | { |
92 | { |
| 93 | // read from pipe (non-blocking) |
93 | // read from pipe (non-blocking) |
| 94 | PlayerEngine_Recv (player); |
94 | PlayerEngine_Recv (player); |
| 95 | if (player->recvbuffer[0] != 0) |
95 | if (player->recvbuffer[0] != 0) |
| 96 | break; // break as soon as we get something |
96 | break; // break as soon as we get something |