mirror of https://github.com/FreeRDP/FreeRDP
libfreerdp-core: implement message dequeuing
This commit is contained in:
parent
c14cf1e203
commit
c1d61ef365
|
@ -194,6 +194,7 @@ struct rdp_update
|
|||
BOOL dump_rfx;
|
||||
BOOL play_rfx;
|
||||
rdpPcap* pcap_rfx;
|
||||
BOOL initialState;
|
||||
|
||||
BITMAP_UPDATE bitmap_update;
|
||||
PALETTE_UPDATE palette_update;
|
||||
|
|
|
@ -102,6 +102,7 @@ BOOL freerdp_connect(freerdp* instance)
|
|||
extension_post_connect(rdp->extension);
|
||||
|
||||
IFCALLRET(instance->PostConnect, status, instance);
|
||||
update_post_connect(instance->update);
|
||||
|
||||
if (status != TRUE)
|
||||
{
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -86,7 +86,6 @@
|
|||
#define SecondaryUpdate_CacheGlyphV2 6
|
||||
#define SecondaryUpdate_CacheBrush 7
|
||||
|
||||
|
||||
/* Alternate Secondary Update */
|
||||
|
||||
#define AltSecUpdate_Class 4
|
||||
|
@ -228,6 +227,8 @@ struct rdp_message
|
|||
|
||||
void message_register_interface(rdpMessage* message, rdpUpdate* update);
|
||||
|
||||
void* message_update_thread(void* arg);
|
||||
|
||||
rdpMessage* message_new();
|
||||
void message_free(rdpMessage* message);
|
||||
|
||||
|
|
|
@ -405,8 +405,23 @@ void update_reset_state(rdpUpdate* update)
|
|||
ZeroMemory(&primary->ellipse_cb, sizeof(ELLIPSE_CB_ORDER));
|
||||
|
||||
primary->order_info.orderType = ORDER_TYPE_PATBLT;
|
||||
altsec->switch_surface.bitmapId = SCREEN_BITMAP_SURFACE;
|
||||
IFCALL(altsec->SwitchSurface, update->context, &(altsec->switch_surface));
|
||||
|
||||
if (!update->initialState)
|
||||
{
|
||||
altsec->switch_surface.bitmapId = SCREEN_BITMAP_SURFACE;
|
||||
IFCALL(altsec->SwitchSurface, update->context, &(altsec->switch_surface));
|
||||
}
|
||||
}
|
||||
|
||||
void update_post_connect(rdpUpdate* update)
|
||||
{
|
||||
if (update->asynchronous)
|
||||
message_register_interface(update->message, update);
|
||||
|
||||
update->altsec->switch_surface.bitmapId = SCREEN_BITMAP_SURFACE;
|
||||
IFCALL(update->altsec->SwitchSurface, update->context, &(update->altsec->switch_surface));
|
||||
|
||||
update->initialState = FALSE;
|
||||
}
|
||||
|
||||
static void update_begin_paint(rdpContext* context)
|
||||
|
@ -705,15 +720,6 @@ void update_register_client_callbacks(rdpUpdate* update)
|
|||
update->SurfaceFrameAcknowledge = update_send_frame_acknowledge;
|
||||
}
|
||||
|
||||
static void* update_thread(void* arg)
|
||||
{
|
||||
rdpUpdate* update;
|
||||
|
||||
update = (rdpUpdate*) arg;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
rdpUpdate* update_new(rdpRdp* rdp)
|
||||
{
|
||||
rdpUpdate* update;
|
||||
|
@ -752,11 +758,14 @@ rdpUpdate* update_new(rdpRdp* rdp)
|
|||
|
||||
update->SuppressOutput = update_send_suppress_output;
|
||||
|
||||
update->initialState = TRUE;
|
||||
//update->asynchronous = TRUE;
|
||||
|
||||
if (update->asynchronous)
|
||||
{
|
||||
update->queue = MessageQueue_New();
|
||||
update->message = message_new();
|
||||
update->thread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) update_thread, update, 0, NULL);
|
||||
update->thread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) message_update_thread, update, 0, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -37,8 +37,11 @@
|
|||
|
||||
rdpUpdate* update_new(rdpRdp* rdp);
|
||||
void update_free(rdpUpdate* update);
|
||||
|
||||
void update_free_bitmap(BITMAP_UPDATE* bitmap_update);
|
||||
|
||||
void update_reset_state(rdpUpdate* update);
|
||||
void update_post_connect(rdpUpdate* update);
|
||||
|
||||
BOOL update_read_bitmap(rdpUpdate* update, STREAM* s, BITMAP_UPDATE* bitmap_update);
|
||||
BOOL update_read_palette(rdpUpdate* update, STREAM* s, PALETTE_UPDATE* palette_update);
|
||||
|
|
Loading…
Reference in New Issue