[client,various] print client specific only on help

do not print if version or other command was run
This commit is contained in:
Armin Novak 2024-10-23 16:32:14 +02:00 committed by akallabeth
parent e48fb1eabd
commit 98f4a2b022
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5
3 changed files with 42 additions and 5 deletions

View File

@ -1663,9 +1663,22 @@ int main(int argc, char* argv[])
if (status)
{
rc = freerdp_client_settings_command_line_status_print(settings, status, argc, argv);
SdlPref::print_config_file_help(2);
if (freerdp_settings_get_bool(settings, FreeRDP_ListMonitors))
sdl_list_monitors(sdl);
else
{
switch (status)
{
case COMMAND_LINE_STATUS_PRINT:
case COMMAND_LINE_STATUS_PRINT_VERSION:
case COMMAND_LINE_STATUS_PRINT_BUILDCONFIG:
break;
case COMMAND_LINE_STATUS_PRINT_HELP:
default:
SdlPref::print_config_file_help(2);
break;
}
}
return rc;
}

View File

@ -1647,9 +1647,22 @@ int main(int argc, char* argv[])
if (status)
{
rc = freerdp_client_settings_command_line_status_print(settings, status, argc, argv);
SdlPref::print_config_file_help(3);
if (freerdp_settings_get_bool(settings, FreeRDP_ListMonitors))
sdl_list_monitors(sdl);
else
{
switch (status)
{
case COMMAND_LINE_STATUS_PRINT:
case COMMAND_LINE_STATUS_PRINT_VERSION:
case COMMAND_LINE_STATUS_PRINT_BUILDCONFIG:
break;
case COMMAND_LINE_STATUS_PRINT_HELP:
default:
SdlPref::print_config_file_help(3);
break;
}
}
return rc;
}

View File

@ -80,11 +80,22 @@ int main(int argc, char* argv[])
{
rc = freerdp_client_settings_command_line_status_print(settings, status, argc, argv);
xfreerdp_print_help();
if (freerdp_settings_get_bool(settings, FreeRDP_ListMonitors))
xf_list_monitors(xfc);
else
{
switch (status)
{
case COMMAND_LINE_STATUS_PRINT:
case COMMAND_LINE_STATUS_PRINT_VERSION:
case COMMAND_LINE_STATUS_PRINT_BUILDCONFIG:
break;
case COMMAND_LINE_STATUS_PRINT_HELP:
default:
xfreerdp_print_help();
break;
}
}
goto out;
}