Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/neutrinolabs/xrdp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspeidy <speidy@gmail.com>2016-04-16 21:04:51 +0300
committerspeidy <speidy@gmail.com>2016-05-13 00:22:07 +0300
commit551d7dd58f934945b8f4508168b55caa086a6d05 (patch)
tree3762c6a97524363de4d9fcaf772e0829b6f09156 /neutrinordp
parentf20e06ff4267465086ca9eac4d6bf6e06707de37 (diff)
neutrinordp: support for 32 to 16 bitmap conversion
Diffstat (limited to 'neutrinordp')
-rw-r--r--neutrinordp/xrdp-color.c22
-rw-r--r--neutrinordp/xrdp-neutrinordp.c3
2 files changed, 25 insertions, 0 deletions
diff --git a/neutrinordp/xrdp-color.c b/neutrinordp/xrdp-color.c
index 34afc67c..80fac32b 100644
--- a/neutrinordp/xrdp-color.c
+++ b/neutrinordp/xrdp-color.c
@@ -213,6 +213,28 @@ convert_bitmap(int in_bpp, int out_bpp, char *bmpdata,
return bmpdata;
}
+ if ((in_bpp == 16) && (out_bpp == 32))
+ {
+ out = (char *)g_malloc(width * height * 4, 0);
+ src = bmpdata;
+ dst = out;
+
+ for (i = 0; i < height; i++)
+ {
+ for (j = 0; j < width; j++)
+ {
+ pixel = *((tui16 *)src);
+ SPLITCOLOR16(red, green, blue, pixel);
+ pixel = COLOR24RGB(red, green, blue);
+ *((tui32 *)dst) = pixel;
+ src += 2;
+ dst += 4;
+ }
+ }
+
+ return out;
+ }
+
g_writeln("convert_bitmap: error unknown conversion from %d to %d",
in_bpp, out_bpp);
return 0;
diff --git a/neutrinordp/xrdp-neutrinordp.c b/neutrinordp/xrdp-neutrinordp.c
index 784b6e88..e2acc6de 100644
--- a/neutrinordp/xrdp-neutrinordp.c
+++ b/neutrinordp/xrdp-neutrinordp.c
@@ -145,6 +145,9 @@ lxrdp_connect(struct mod *mod)
g_snprintf(buf, 128, "Authentication error check your password "
"and username");
break;
+ case INSUFFICIENTPRIVILEGESERROR:
+ g_snprintf(buf, 128, "Insufficent privileges on target server");
+ break;
default:
g_snprintf(buf, 128, "Unhandled Errorcode from connect : %d",
connectErrorCode);