diff options
author | Giovanni Panozzo <giovanni@panozzo.it> | 2017-11-04 13:52:01 +0300 |
---|---|---|
committer | Giovanni Panozzo <giovanni@panozzo.it> | 2017-11-04 13:52:01 +0300 |
commit | fbd7ec1de63a08f1aab3c7ab47342e061e39b9ab (patch) | |
tree | 3a975434b8a24fe760dfcfbaf09b96bb13564915 /remmina-plugins | |
parent | 8dff34b19d8ca69df4fc773b0d2da1c8b5249726 (diff) |
Fix .rdp file export width and height
Diffstat (limited to 'remmina-plugins')
-rw-r--r-- | remmina-plugins/rdp/rdp_file.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/remmina-plugins/rdp/rdp_file.c b/remmina-plugins/rdp/rdp_file.c index e2f1b2aa2..87f28d04f 100644 --- a/remmina-plugins/rdp/rdp_file.c +++ b/remmina-plugins/rdp/rdp_file.c @@ -217,12 +217,15 @@ gboolean remmina_rdp_file_export_channel(RemminaFile* remminafile, FILE* fp) { TRACE_CALL(__func__); const gchar* cs; + int w, h; fprintf(fp, "screen mode id:i:2\r\n"); - cs = remmina_plugin_service->file_get_string(remminafile, "resolution_width"); - fprintf(fp, "desktopwidth:i:%s\r\n", cs); - cs = remmina_plugin_service->file_get_string(remminafile, "resolution_height"); - fprintf(fp, "desktopheight:i:%s\r\n", cs); + w = remmina_plugin_service->file_get_int(remminafile, "resolution_width", -1); + h = remmina_plugin_service->file_get_int(remminafile, "resolution_height", -1); + if ( w > 0 && h > 0 ) { + fprintf(fp, "desktopwidth:i:%d\r\n", w); + fprintf(fp, "desktopheight:i:%s\r\n", h); + } fprintf(fp, "session bpp:i:%i\r\n", remmina_plugin_service->file_get_int(remminafile, "colordepth", 8)); //fprintf(fp, "winposstr:s:0,1,123,34,931,661\r\n"); |