rdpUpdate: add autoCalculateBitmapData flag
This commit is contained in:
parent
4a6b843f16
commit
99b10aa98d
@ -253,6 +253,11 @@ struct rdp_update
|
||||
rdpBounds currentBounds;
|
||||
rdpBounds previousBounds;
|
||||
CRITICAL_SECTION mux;
|
||||
|
||||
/* if autoCalculateBitmapData is set to TRUE, the server automatically
|
||||
* fills BITMAP_DATA struct members: flags, cbCompMainBodySize and cbCompFirstRowSize.
|
||||
*/
|
||||
BOOL autoCalculateBitmapData;
|
||||
};
|
||||
|
||||
#endif /* FREERDP_UPDATE_H */
|
||||
|
@ -148,16 +148,19 @@ static BOOL update_write_bitmap_data(rdpUpdate* update, wStream* s,
|
||||
if (!Stream_EnsureRemainingCapacity(s, 64 + bitmapData->bitmapLength))
|
||||
return FALSE;
|
||||
|
||||
bitmapData->flags = 0;
|
||||
bitmapData->cbCompFirstRowSize = 0;
|
||||
|
||||
if (bitmapData->compressed)
|
||||
bitmapData->flags |= BITMAP_COMPRESSION;
|
||||
|
||||
if (update->context->settings->NoBitmapCompressionHeader)
|
||||
if (update->autoCalculateBitmapData)
|
||||
{
|
||||
bitmapData->flags |= NO_BITMAP_COMPRESSION_HDR;
|
||||
bitmapData->cbCompMainBodySize = bitmapData->bitmapLength;
|
||||
bitmapData->flags = 0;
|
||||
bitmapData->cbCompFirstRowSize = 0;
|
||||
|
||||
if (bitmapData->compressed)
|
||||
bitmapData->flags |= BITMAP_COMPRESSION;
|
||||
|
||||
if (update->context->settings->NoBitmapCompressionHeader)
|
||||
{
|
||||
bitmapData->flags |= NO_BITMAP_COMPRESSION_HDR;
|
||||
bitmapData->cbCompMainBodySize = bitmapData->bitmapLength;
|
||||
}
|
||||
}
|
||||
|
||||
Stream_Write_UINT16(s, bitmapData->destLeft);
|
||||
@ -2190,6 +2193,7 @@ rdpUpdate* update_new(rdpRdp* rdp)
|
||||
deleteList->cIndices = 0;
|
||||
update->SuppressOutput = update_send_suppress_output;
|
||||
update->initialState = TRUE;
|
||||
update->autoCalculateBitmapData = TRUE;
|
||||
update->queue = MessageQueue_New(&cb);
|
||||
|
||||
if (!update->queue)
|
||||
|
Loading…
Reference in New Issue
Block a user