Fixed post disconnect hook.
This commit is contained in:
parent
4e11883f27
commit
b8b84473a3
@ -472,10 +472,10 @@ BOOL freerdp_image_copy(BYTE* pDstData, DWORD DstFormat,
|
||||
break;
|
||||
}
|
||||
|
||||
if (nDstStep <= 0)
|
||||
if (nDstStep == 0)
|
||||
nDstStep = nWidth * GetBytesPerPixel(DstFormat);
|
||||
|
||||
if (nSrcStep <= 0)
|
||||
if (nSrcStep == 0)
|
||||
nSrcStep = nWidth * GetBytesPerPixel(SrcFormat);
|
||||
|
||||
if (vSrcVFlip)
|
||||
|
@ -275,17 +275,10 @@ BOOL interleaved_decompress(BITMAP_INTERLEAVED_CONTEXT* interleaved,
|
||||
UINT32 scanline;
|
||||
UINT32 SrcFormat;
|
||||
UINT32 BufferSize;
|
||||
UINT32 dstBitsPerPixel;
|
||||
UINT32 dstBytesPerPixel;
|
||||
dstBitsPerPixel = GetBitsPerPixel(DstFormat);
|
||||
dstBytesPerPixel = GetBytesPerPixel(DstFormat);
|
||||
|
||||
if (!interleaved)
|
||||
return FALSE;
|
||||
|
||||
if (nDstStep <= 0)
|
||||
nDstStep = nDstWidth * dstBytesPerPixel;
|
||||
|
||||
switch (bpp)
|
||||
{
|
||||
case 24:
|
||||
|
@ -403,12 +403,13 @@ BOOL freerdp_disconnect(freerdp* instance)
|
||||
rdp = instance->context->rdp;
|
||||
rdp_client_disconnect(rdp);
|
||||
update_post_disconnect(instance->update);
|
||||
IFCALL(instance->PostDisconnect, instance);
|
||||
|
||||
if (freerdp_channels_disconnect(instance->context->channels,
|
||||
instance) != CHANNEL_RC_OK)
|
||||
rc = FALSE;
|
||||
|
||||
IFCALL(instance->PostDisconnect, instance);
|
||||
|
||||
if (instance->update->pcap_rfx)
|
||||
{
|
||||
instance->update->dump_rfx = FALSE;
|
||||
|
@ -130,35 +130,32 @@ static BOOL gdi_Bitmap_Paint(rdpContext* context, rdpBitmap* bitmap)
|
||||
}
|
||||
|
||||
static BOOL gdi_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap,
|
||||
const BYTE* pSrcData, UINT32 width, UINT32 height,
|
||||
const BYTE* pSrcData, UINT32 DstWidth, UINT32 DstHeight,
|
||||
UINT32 bpp, UINT32 length, BOOL compressed,
|
||||
UINT32 codecId)
|
||||
{
|
||||
UINT16 size;
|
||||
UINT32 SrcSize = length;
|
||||
UINT32 SrcFormat;
|
||||
UINT32 bytesPerPixel;
|
||||
UINT32 DstWidth = width;
|
||||
UINT32 DstHeight = height;
|
||||
rdpGdi* gdi = context->gdi;
|
||||
bytesPerPixel = (bpp + 7) / 8;
|
||||
size = width * height * GetBytesPerPixel(gdi->dstFormat);
|
||||
bitmap->data = (BYTE*) _aligned_malloc(size, 16);
|
||||
|
||||
bitmap->compressed = FALSE;
|
||||
bitmap->format = gdi->dstFormat;
|
||||
bitmap->length = DstWidth * DstHeight * GetBytesPerPixel(bitmap->format);
|
||||
|
||||
bytesPerPixel = GetBytesPerPixel(bpp);
|
||||
bitmap->data = (BYTE*) _aligned_malloc(bitmap->length, 16);
|
||||
|
||||
if (!bitmap->data)
|
||||
return FALSE;
|
||||
|
||||
bitmap->compressed = FALSE;
|
||||
bitmap->length = size;
|
||||
bitmap->format = gdi->dstFormat;
|
||||
|
||||
if (compressed)
|
||||
{
|
||||
if (bpp < 32)
|
||||
{
|
||||
if (!interleaved_decompress(context->codecs->interleaved,
|
||||
pSrcData, SrcSize,
|
||||
width, height,
|
||||
DstWidth, DstHeight,
|
||||
bpp,
|
||||
bitmap->data, bitmap->format,
|
||||
0, 0, 0, DstWidth, DstHeight,
|
||||
@ -168,9 +165,9 @@ static BOOL gdi_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap,
|
||||
else
|
||||
{
|
||||
if (!planar_decompress(context->codecs->planar, pSrcData, SrcSize,
|
||||
width, height,
|
||||
DstWidth, DstHeight,
|
||||
bitmap->data, bitmap->format, 0, 0, 0,
|
||||
width, height, TRUE))
|
||||
DstWidth, DstHeight, TRUE))
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user