Scale back resolution assuming 96 DPI on the desktop side.

This commit is contained in:
Michael Jumper 2013-12-27 00:34:37 -08:00
parent 78202d25ba
commit c81be87790

View File

@ -480,7 +480,7 @@ int guac_client_init(guac_client* client, int argc, char** argv) {
settings->port = atoi(argv[IDX_PORT]); settings->port = atoi(argv[IDX_PORT]);
/* Use optimal width unless overridden */ /* Use optimal width unless overridden */
settings->width = client->info.optimal_width; settings->width = client->info.optimal_width * 96 / client->info.optimal_resolution;
if (argv[IDX_WIDTH][0] != '\0') if (argv[IDX_WIDTH][0] != '\0')
settings->width = atoi(argv[IDX_WIDTH]); settings->width = atoi(argv[IDX_WIDTH]);
@ -496,7 +496,7 @@ int guac_client_init(guac_client* client, int argc, char** argv) {
settings->width = settings->width & ~0x3; settings->width = settings->width & ~0x3;
/* Use optimal height unless overridden */ /* Use optimal height unless overridden */
settings->height = client->info.optimal_height; settings->height = client->info.optimal_height * 96 / client->info.optimal_resolution;
if (argv[IDX_HEIGHT][0] != '\0') if (argv[IDX_HEIGHT][0] != '\0')
settings->height = atoi(argv[IDX_HEIGHT]); settings->height = atoi(argv[IDX_HEIGHT]);