diff options
author | joshudson <joshudson@gmail.com> | 2017-10-31 22:37:18 -0700 |
---|---|---|
committer | Henrik Andersson <hean01@cendio.com> | 2017-11-01 06:37:18 +0100 |
commit | fe692058a288442b9409555f2bf39e965de705fb (patch) | |
tree | db689f434a564b72345beba37aab3d365ed34c34 /rdesktop.c | |
parent | ba568443e18882eea3b65a8ebb15054940c7f767 (diff) | |
download | rdesktop-fe692058a288442b9409555f2bf39e965de705fb.zip |
Add Windows 10 support: add option to send DPI to server as Windows 1… (#66)
Add support for choosing DPI of remote session
Diffstat (limited to 'rdesktop.c')
-rw-r--r-- | rdesktop.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -71,6 +71,7 @@ int g_sizeopt = 0; /* If non-zero, a special size has been requested. If 1, the geometry will be fetched from _NET_WORKAREA. If negative, absolute value specifies the percent of the whole screen. */ +int g_dpi = 0; /* device DPI: default not set */ int g_width = 800; int g_height = 600; int g_xpos = 0; @@ -169,7 +170,7 @@ usage(char *program) fprintf(stderr, " -p: password (- to prompt)\n"); fprintf(stderr, " -n: client hostname\n"); fprintf(stderr, " -k: keyboard layout on server (en-us, de, sv, etc.)\n"); - fprintf(stderr, " -g: desktop geometry (WxH)\n"); + fprintf(stderr, " -g: desktop geometry (WxH[@dpi])\n"); #ifdef WITH_SCARD fprintf(stderr, " -i: enables smartcard authentication, password is used as pin\n"); #endif @@ -741,6 +742,16 @@ main(int argc, char *argv[]) p++; } + if (*p == '@') + { + g_dpi = strtol(p + 1, &p, 10); + if (g_dpi <= 0) + { + logger(Core, Error, "invalid DPI: expected a positive integer after @\n"); + return EX_USAGE; + } + } + if (*p == '+' || *p == '-') { g_pos |= (*p == '-') ? 2 : 1; |