[client,common] allow deactivating RAILS hidef mode

This commit is contained in:
akallabeth 2024-03-21 09:22:29 +01:00 committed by akallabeth
parent b596ad0d45
commit 1b2f95dfde
2 changed files with 17 additions and 13 deletions

View File

@ -3582,18 +3582,18 @@ static int parse_app_options(rdpSettings* settings, const COMMAND_LINE_ARGUMENT_
struct app_map
{
const char* name;
FreeRDP_Settings_Keys_String id;
SSIZE_T id;
int (*fkt)(rdpSettings* settings, const char* value);
};
const struct app_map amap[] = {
{ "program:", FreeRDP_RemoteApplicationProgram, parse_app_option_program },
{ "workdir:", FreeRDP_RemoteApplicationWorkingDir, NULL },
{ "name:", FreeRDP_RemoteApplicationName, NULL },
{ "icon:", FreeRDP_RemoteApplicationIcon, NULL },
{ "cmd:", FreeRDP_RemoteApplicationCmdLine, NULL },
{ "file:", FreeRDP_RemoteApplicationFile, NULL },
{ "guid:", FreeRDP_RemoteApplicationGuid, NULL },
};
const struct app_map amap[] = { { "program:", FreeRDP_RemoteApplicationProgram,
parse_app_option_program },
{ "workdir:", FreeRDP_RemoteApplicationWorkingDir, NULL },
{ "name:", FreeRDP_RemoteApplicationName, NULL },
{ "icon:", FreeRDP_RemoteApplicationIcon, NULL },
{ "cmd:", FreeRDP_RemoteApplicationCmdLine, NULL },
{ "file:", FreeRDP_RemoteApplicationFile, NULL },
{ "guid:", FreeRDP_RemoteApplicationGuid, NULL },
{ "hidef:", FreeRDP_HiDefRemoteApp, NULL } };
for (size_t x = 0; x < count; x++)
{
BOOL handled = FALSE;
@ -3607,8 +3607,12 @@ static int parse_app_options(rdpSettings* settings, const COMMAND_LINE_ARGUMENT_
const char* xval = &val[strlen(cur->name)];
if (cur->fkt)
rc = cur->fkt(settings, xval);
else if (!freerdp_settings_set_string(settings, cur->id, xval))
rc = COMMAND_LINE_ERROR_MEMORY;
else
{
const char* name = freerdp_settings_get_name_for_key(cur->id);
if (!freerdp_settings_set_value_for_name(settings, name, xval))
rc = COMMAND_LINE_ERROR_MEMORY;
}
handled = TRUE;
break;

View File

@ -34,7 +34,7 @@ static const COMMAND_LINE_ARGUMENT_A global_cmd_args[] = {
"desktop composition" },
{ "app", COMMAND_LINE_VALUE_REQUIRED,
"program:[<path>|<||alias>],cmd:<command>,file:<filename>,guid:<guid>,icon:<filename>,name:<"
"name>,workdir:<directory>",
"name>,workdir:<directory>,hidef:[on|off]",
NULL, NULL, -1, NULL, "Remote application program" },
#if defined(WITH_FREERDP_DEPRECATED_COMMANDLINE)
{ "app-cmd", COMMAND_LINE_VALUE_REQUIRED, "<parameters>", NULL, NULL, -1, NULL,