Automtically discover Gamestream servers on local network

This commit is contained in:
Iwan Timmer
2015-05-11 17:13:34 +02:00
parent 83bcfff00a
commit b47e07e888
4 changed files with 141 additions and 4 deletions

View File

@@ -22,6 +22,7 @@
#include "video.h"
#include "audio.h"
#include "input.h"
#include "discover.h"
#include "limelight-common/Limelight.h"
@@ -195,8 +196,17 @@ int main(int argc, char* argv[]) {
}
if (address == NULL) {
perror("No address given");
exit(-1);
address = malloc(MAX_ADDRESS_SIZE);
address[0] = 0;
if (address == NULL) {
perror("Not enough memory");
exit(-1);
}
discover_server(address);
if (address[0] == 0) {
perror("Can't find server");
exit(-1);
}
}
client_init(address);