Change variable name to web_api_url

This commit is contained in:
fearlessTobi 2018-09-12 19:07:06 +02:00
parent d408f89a91
commit b82bf1ccdb
8 changed files with 23 additions and 26 deletions

View file

@ -42,7 +42,7 @@ static void PrintHelp(const char* argv0) {
"--preferred-game-id The preferred game-id for this room\n"
"--username The username used for announce\n"
"--token The token used for announce\n"
"--endpoint-url The endpoint url to the announce server\n"
"--web-api-url Citra Web API url\n"
"-h, --help Display this help and exit\n"
"-v, --version Output version information and exit\n";
}
@ -65,7 +65,7 @@ int main(int argc, char** argv) {
std::string preferred_game;
std::string username;
std::string token;
std::string endpoint_url;
std::string web_api_url;
u64 preferred_game_id = 0;
u32 port = Network::DefaultRoomPort;
u32 max_members = 16;
@ -79,7 +79,7 @@ int main(int argc, char** argv) {
{"preferred-game-id", required_argument, 0, 'i'},
{"username", required_argument, 0, 'u'},
{"token", required_argument, 0, 't'},
{"endpoint-url", required_argument, 0, 'a'},
{"web-api-url", required_argument, 0, 'a'},
{"help", no_argument, 0, 'h'},
{"version", no_argument, 0, 'v'},
{0, 0, 0, 0},
@ -114,7 +114,7 @@ int main(int argc, char** argv) {
token.assign(optarg);
break;
case 'a':
endpoint_url.assign(optarg);
web_api_url.assign(optarg);
break;
case 'h':
PrintHelp(argv[0]);
@ -160,13 +160,13 @@ int main(int argc, char** argv) {
announce = false;
std::cout << "token is empty: Hosting a private room\n\n";
}
if (endpoint_url.empty() && announce) {
if (web_api_url.empty() && announce) {
announce = false;
std::cout << "endpoint url is empty: Hosting a private room\n\n";
}
if (announce) {
std::cout << "Hosting a public room\n\n";
Settings::values.web_services_endpoint_url = endpoint_url;
Settings::values.web_api_url = web_api_url;
Settings::values.citra_username = username;
Settings::values.citra_token = token;
}