Use width/height from client if not specified in args.
This commit is contained in:
parent
7c96d13d0d
commit
4758595e23
@ -322,26 +322,26 @@ int guac_client_init(guac_client* client, int argc, char** argv) {
|
||||
settings->encryption_method = ENCRYPTION_METHOD_40BIT | ENCRYPTION_METHOD_128BIT | ENCRYPTION_METHOD_FIPS;
|
||||
settings->encryption_level = ENCRYPTION_LEVEL_CLIENT_COMPATIBLE;
|
||||
|
||||
/* Session width */
|
||||
settings->width = RDP_DEFAULT_WIDTH;
|
||||
/* Use optimal width unless overridden */
|
||||
settings->width = client->info.optimal_width;
|
||||
if (argv[IDX_WIDTH][0] != '\0')
|
||||
settings->width = atoi(argv[IDX_WIDTH]);
|
||||
|
||||
/* Use default width if given width is invalid. */
|
||||
if (settings->width == 0) {
|
||||
if (settings->width <= 0) {
|
||||
settings->width = RDP_DEFAULT_WIDTH;
|
||||
guac_client_log_error(client,
|
||||
"Invalid width: \"%s\". Using default of %i.",
|
||||
argv[IDX_WIDTH], settings->width);
|
||||
}
|
||||
|
||||
/* Session height */
|
||||
settings->height = RDP_DEFAULT_HEIGHT;
|
||||
/* Use optimal height unless overridden */
|
||||
settings->height = client->info.optimal_height;
|
||||
if (argv[IDX_HEIGHT][0] != '\0')
|
||||
settings->height = atoi(argv[IDX_HEIGHT]);
|
||||
|
||||
/* Use default height if given height is invalid. */
|
||||
if (settings->height == 0) {
|
||||
if (settings->height <= 0) {
|
||||
settings->height = RDP_DEFAULT_HEIGHT;
|
||||
guac_client_log_error(client,
|
||||
"Invalid height: \"%s\". Using default of %i.",
|
||||
|
Loading…
Reference in New Issue
Block a user