summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xrdp/Makefile.am2
-rw-r--r--xrdp/ad24b.bmpbin0 -> 58854 bytes
-rwxr-xr-xxrdp/ad256.bmpbin20678 -> 19766 bytes
-rw-r--r--xrdp/xrdp24b.bmpbin0 -> 147510 bytes
-rwxr-xr-xxrdp/xrdp256.bmpbin50230 -> 49278 bytes
-rw-r--r--xrdp/xrdp_bitmap.c16
-rw-r--r--xrdp/xrdp_login_wnd.c18
7 files changed, 28 insertions, 8 deletions
diff --git a/xrdp/Makefile.am b/xrdp/Makefile.am
index 26eff4a1..92c104cb 100644
--- a/xrdp/Makefile.am
+++ b/xrdp/Makefile.am
@@ -40,7 +40,9 @@ xrdpsysconf_DATA = \
xrdppkgdatadir=$(datadir)/xrdp
xrdppkgdata_DATA = \
+ ad24b.bmp \
ad256.bmp \
+ xrdp24b.bmp \
xrdp256.bmp \
sans-10.fv1 \
cursor0.cur \
diff --git a/xrdp/ad24b.bmp b/xrdp/ad24b.bmp
new file mode 100644
index 00000000..47589979
--- /dev/null
+++ b/xrdp/ad24b.bmp
Binary files differ
diff --git a/xrdp/ad256.bmp b/xrdp/ad256.bmp
index a5d9d4ed..5e1946c0 100755
--- a/xrdp/ad256.bmp
+++ b/xrdp/ad256.bmp
Binary files differ
diff --git a/xrdp/xrdp24b.bmp b/xrdp/xrdp24b.bmp
new file mode 100644
index 00000000..14d83cb4
--- /dev/null
+++ b/xrdp/xrdp24b.bmp
Binary files differ
diff --git a/xrdp/xrdp256.bmp b/xrdp/xrdp256.bmp
index 4a04ed03..6191514e 100755
--- a/xrdp/xrdp256.bmp
+++ b/xrdp/xrdp256.bmp
Binary files differ
diff --git a/xrdp/xrdp_bitmap.c b/xrdp/xrdp_bitmap.c
index e3e80c81..0b82b3d6 100644
--- a/xrdp/xrdp_bitmap.c
+++ b/xrdp/xrdp_bitmap.c
@@ -451,8 +451,8 @@ xrdp_bitmap_load(struct xrdp_bitmap* self, const char* filename, int* palette)
/* read palette */
g_file_seek(fd, 14 + header.size);
init_stream(s, 8192);
- g_file_read(fd, s->data, 256 * sizeof(int));
- for (i = 0; i < 256; i++)
+ g_file_read(fd, s->data, header.clr_used * sizeof(int));
+ for (i = 0; i < header.clr_used; i++)
{
in_uint32_le(s, palette1[i]);
}
@@ -501,8 +501,8 @@ xrdp_bitmap_load(struct xrdp_bitmap* self, const char* filename, int* palette)
/* read palette */
g_file_seek(fd, 14 + header.size);
init_stream(s, 8192);
- g_file_read(fd, s->data, 16 * sizeof(int));
- for (i = 0; i < 16; i++)
+ g_file_read(fd, s->data, header.clr_used * sizeof(int));
+ for (i = 0; i < header.clr_used; i++)
{
in_uint32_le(s, palette1[i]);
}
@@ -527,9 +527,13 @@ xrdp_bitmap_load(struct xrdp_bitmap* self, const char* filename, int* palette)
if ((j & 1) == 0)
{
in_uint8(s, k);
+ color = (k >> 4) & 0xf;
}
- color = palette1[(k & 0xf0) >> 4];
- k <<= 4;
+ else
+ {
+ color = k & 0xf;
+ }
+ color = palette1[color];
if (self->bpp == 8)
{
color = xrdp_bitmap_get_index(self, palette, color);
diff --git a/xrdp/xrdp_login_wnd.c b/xrdp/xrdp_login_wnd.c
index 15524c73..7334399d 100644
--- a/xrdp/xrdp_login_wnd.c
+++ b/xrdp/xrdp_login_wnd.c
@@ -487,7 +487,14 @@ xrdp_login_wnd_create(struct xrdp_wm* self)
{
/* image */
but = xrdp_bitmap_create(4, 4, self->screen->bpp, WND_TYPE_IMAGE, self);
- g_snprintf(file_path, 255, "%s/xrdp256.bmp", XRDP_SHARE_PATH);
+ if (self->screen->bpp > 8)
+ {
+ g_snprintf(file_path, 255, "%s/xrdp24b.bmp", XRDP_SHARE_PATH);
+ }
+ else
+ {
+ g_snprintf(file_path, 255, "%s/xrdp256.bmp", XRDP_SHARE_PATH);
+ }
xrdp_bitmap_load(but, file_path, self->palette);
but->parent = self->screen;
but->owner = self->screen;
@@ -497,7 +504,14 @@ xrdp_login_wnd_create(struct xrdp_wm* self)
/* image */
but = xrdp_bitmap_create(4, 4, self->screen->bpp, WND_TYPE_IMAGE, self);
- g_snprintf(file_path, 255, "%s/ad256.bmp", XRDP_SHARE_PATH);
+ if (self->screen->bpp > 8)
+ {
+ g_snprintf(file_path, 255, "%s/ad24b.bmp", XRDP_SHARE_PATH);
+ }
+ else
+ {
+ g_snprintf(file_path, 255, "%s/ad256.bmp", XRDP_SHARE_PATH);
+ }
xrdp_bitmap_load(but, file_path, self->palette);
but->parent = self->login_window;
but->owner = self->login_window;