Pairing doesn't work if a stream is in progress

This commit is contained in:
Cameron Gutman
2015-06-25 21:02:18 -07:00
parent bfd84705a1
commit 3e543c95f6

View File

@@ -227,6 +227,11 @@ void client_pair(const char *address) {
return;
}
if (currentGame != 0) {
fprintf(stderr, "The computer is currently in a game. You must close the game before pairing.\n");
exit(-1);
}
char pin[5];
sprintf(pin, "%d%d%d%d", (int)random() % 10, (int)random() % 10, (int)random() % 10, (int)random() % 10);
printf("Please enter the following PIN on the target PC: %s\n", pin);