Merge pull request #3964 from akallabeth/update_reset_state_fix

Update reset state fix
This commit is contained in:
Martin Fleisz 2017-05-18 09:49:36 +02:00 committed by GitHub
commit 4cc1ba5b1d
2 changed files with 24 additions and 4 deletions

View File

@ -44,7 +44,12 @@ static BOOL update_gdi_create_offscreen_bitmap(rdpContext* context,
UINT32 i;
UINT16 index;
rdpBitmap* bitmap;
rdpCache* cache = context->cache;
rdpCache* cache;
if (!context || !createOffscreenBitmap || !context->cache)
return FALSE;
cache = context->cache;
bitmap = Bitmap_Alloc(context);
if (!bitmap)
@ -77,8 +82,16 @@ static BOOL update_gdi_create_offscreen_bitmap(rdpContext* context,
static BOOL update_gdi_switch_surface(rdpContext* context,
const SWITCH_SURFACE_ORDER* switchSurface)
{
rdpCache* cache = context->cache;
rdpBitmap* bitmap = context->graphics->Bitmap_Prototype;
rdpCache* cache;
rdpBitmap* bitmap;
if (!context || !context->cache || !switchSurface || !context->graphics)
return FALSE;
cache = context->cache;
bitmap = context->graphics->Bitmap_Prototype;
if (!bitmap)
return FALSE;
if (switchSurface->bitmapId == SCREEN_BITMAP_SURFACE)
{

View File

@ -631,6 +631,8 @@ void update_post_disconnect(rdpUpdate* update)
if (update->asynchronous)
update_message_proxy_free(update->proxy);
update->initialState = TRUE;
}
static BOOL update_begin_paint(rdpContext* context)
@ -1714,7 +1716,12 @@ static BOOL update_send_switch_surface_order(
BYTE orderType;
BYTE controlFlags;
int headerLength;
rdpUpdate* update = context->update;
rdpUpdate* update;
if (!context || !switch_surface || !context->update)
return FALSE;
update = context->update;
headerLength = 1;
orderType = ORDER_TYPE_SWITCH_SURFACE;
controlFlags = ORDER_SECONDARY | (orderType << 2);