xfreerdp: xfc->palette wasn't updated with /gdi:sw
When using software gdi (/gdi:sw) the rdp update PDU callback gdi_palette_update() is used which writes the new colors to the rdpContext's gdi->palette buffer. The X11 functions however access xfc->palette which gets only updated by xf_gdi_palette_update() which is the callback if /gdi:hw is used. This commit changes xfc->palette to a pointer which points to xfc's private buffer with /gdi:hw or to the gdi->palette if software gdi is used.
This commit is contained in:
parent
20aa10e6ae
commit
f04bb6c53d
@ -1093,9 +1093,11 @@ BOOL xf_post_connect(freerdp* instance)
|
||||
|
||||
gdi = context->gdi;
|
||||
xfc->primary_buffer = gdi->primary_buffer;
|
||||
xfc->palette = gdi->palette;
|
||||
}
|
||||
else
|
||||
{
|
||||
xfc->palette = xfc->palette_hwgdi;
|
||||
xfc->srcBpp = settings->ColorDepth;
|
||||
xf_gdi_register_update_callbacks(update);
|
||||
}
|
||||
|
@ -127,7 +127,8 @@ struct xf_context
|
||||
HANDLE mutex;
|
||||
BOOL UseXThreads;
|
||||
BOOL cursorHidden;
|
||||
BYTE palette[256 * 4];
|
||||
BYTE* palette;
|
||||
BYTE palette_hwgdi[256 * 4];
|
||||
|
||||
HGDI_DC hdc;
|
||||
UINT32 bitmap_size;
|
||||
|
Loading…
Reference in New Issue
Block a user