imediate send available img data when client become ready
All checks were successful
gitea-sync/antd-wvnc-plugin/pipeline/head This commit looks good

This commit is contained in:
DanyLE 2023-01-08 00:00:24 +01:00
parent a3f28280c9
commit bff0fb40c6

5
wvnc.c
View File

@ -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