mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2025-06-03 00:00:20 +00:00
Restore window size by percent
1.0 had the ability to specifiy window geometry by a percentage. The support is still there, just needed command line support. Example in 1.1 syntax: /size:85%
This commit is contained in:
parent
362c992f33
commit
a8c31a286b
@ -43,7 +43,7 @@ COMMAND_LINE_ARGUMENT_A args[] =
|
||||
{ "port", COMMAND_LINE_VALUE_REQUIRED, "<number>", NULL, NULL, -1, NULL, "Server port" },
|
||||
{ "w", COMMAND_LINE_VALUE_REQUIRED, "<width>", "1024", NULL, -1, NULL, "Width" },
|
||||
{ "h", COMMAND_LINE_VALUE_REQUIRED, "<height>", "768", NULL, -1, NULL, "Height" },
|
||||
{ "size", COMMAND_LINE_VALUE_REQUIRED, "<width>x<height>", "1024x768", NULL, -1, NULL, "Screen size" },
|
||||
{ "size", COMMAND_LINE_VALUE_REQUIRED, "<width>x<height> or <percent>%", "1024x768", NULL, -1, NULL, "Screen size" },
|
||||
{ "f", COMMAND_LINE_VALUE_FLAG, NULL, NULL, NULL, -1, NULL, "Fullscreen mode" },
|
||||
{ "bpp", COMMAND_LINE_VALUE_REQUIRED, "<depth>", "16", NULL, -1, NULL, "Session bpp (color depth)" },
|
||||
{ "kbd", COMMAND_LINE_VALUE_REQUIRED, "0x<layout id> or <layout name>", NULL, NULL, -1, NULL, "Keyboard layout" },
|
||||
@ -1271,6 +1271,14 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
|
||||
settings->DesktopWidth = atoi(str);
|
||||
settings->DesktopHeight = atoi(&p[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
p = strchr(str, '%');
|
||||
if(p)
|
||||
{
|
||||
settings->PercentScreen = atoi(str);
|
||||
}
|
||||
}
|
||||
|
||||
free(str);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user