From bff0fb40c6ef8c7e2393169fca51844108982f48 Mon Sep 17 00:00:00 2001 From: DanyLE Date: Sun, 8 Jan 2023 00:00:24 +0100 Subject: [PATCH] imediate send available img data when client become ready --- wvnc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wvnc.c b/wvnc.c index 1b6792a..461c92e 100644 --- a/wvnc.c +++ b/wvnc.c @@ -332,6 +332,10 @@ static void finish_update(rfbClient *client) // LOG("User is not ready"); return; } + if(user_data->uh == 0 || user_data->uw == 0) + { + return; + } uint8_t bytes = (uint8_t)client->format.bitsPerPixel / 8; user_data->last_update = current_time; int cw = user_data->uw; @@ -618,6 +622,7 @@ void *consume_client(void *ptr, wvnc_cmd_t header) data = (uint8_t *)malloc(1); *data = (uint8_t)header.data[0]; user_data->ready = 1; + finish_update(user_data->vncl); return data; break; case 0x05: //mouse event