diff options
-rw-r--r-- | xrdp/Makefile.am | 2 | ||||
-rw-r--r-- | xrdp/ad24b.bmp | bin | 0 -> 58854 bytes | |||
-rwxr-xr-x | xrdp/ad256.bmp | bin | 20678 -> 19766 bytes | |||
-rw-r--r-- | xrdp/xrdp24b.bmp | bin | 0 -> 147510 bytes | |||
-rwxr-xr-x | xrdp/xrdp256.bmp | bin | 50230 -> 49278 bytes | |||
-rw-r--r-- | xrdp/xrdp_bitmap.c | 16 | ||||
-rw-r--r-- | xrdp/xrdp_login_wnd.c | 18 |
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 Binary files differnew file mode 100644 index 00000000..47589979 --- /dev/null +++ b/xrdp/ad24b.bmp diff --git a/xrdp/ad256.bmp b/xrdp/ad256.bmp Binary files differindex a5d9d4ed..5e1946c0 100755 --- a/xrdp/ad256.bmp +++ b/xrdp/ad256.bmp diff --git a/xrdp/xrdp24b.bmp b/xrdp/xrdp24b.bmp Binary files differnew file mode 100644 index 00000000..14d83cb4 --- /dev/null +++ b/xrdp/xrdp24b.bmp diff --git a/xrdp/xrdp256.bmp b/xrdp/xrdp256.bmp Binary files differindex 4a04ed03..6191514e 100755 --- a/xrdp/xrdp256.bmp +++ b/xrdp/xrdp256.bmp 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; |