mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-02-16 10:30:47 +00:00
Add debug option to show http traffic
This commit is contained in:
@@ -64,6 +64,7 @@ static struct option long_options[] = {
|
||||
{"codec", required_argument, NULL, 'x'},
|
||||
{"unsupported", no_argument, NULL, 'y'},
|
||||
{"verbose", no_argument, NULL, 'z'},
|
||||
{"debug", no_argument, NULL, 'Z'},
|
||||
{0, 0, 0, 0},
|
||||
};
|
||||
|
||||
@@ -207,6 +208,9 @@ static void parse_argument(int c, char* value, PCONFIGURATION config) {
|
||||
case 'z':
|
||||
config->debug_level = 1;
|
||||
break;
|
||||
case 'Z':
|
||||
config->debug_level = 2;
|
||||
break;
|
||||
case 1:
|
||||
if (config->action == NULL)
|
||||
config->action = value;
|
||||
|
||||
@@ -142,6 +142,7 @@ static void help() {
|
||||
printf("\t-config <config>\tLoad configuration file\n");
|
||||
printf("\t-save <config>\t\tSave configuration file\n");
|
||||
printf("\t-verbose\t\tEnable verbose output\n");
|
||||
printf("\t-debug\t\t\tEnable verbose and debug output\n");
|
||||
printf("\n Streaming options\n\n");
|
||||
printf("\t-720\t\t\tUse 1280x720 resolution [default]\n");
|
||||
printf("\t-1080\t\t\tUse 1920x1080 resolution\n");
|
||||
@@ -215,7 +216,7 @@ int main(int argc, char* argv[]) {
|
||||
printf("Connect to %s...\n", config.address);
|
||||
|
||||
int ret;
|
||||
if ((ret = gs_init(&server, config.address, config.key_dir)) == GS_OUT_OF_MEMORY) {
|
||||
if ((ret = gs_init(&server, config.address, config.key_dir, config.debug_level)) == GS_OUT_OF_MEMORY) {
|
||||
fprintf(stderr, "Not enough memory\n");
|
||||
exit(-1);
|
||||
} else if (ret == GS_INVALID) {
|
||||
|
||||
Reference in New Issue
Block a user