qt: Enable and make VNC work properly

This commit is contained in:
Cacodemon345
2022-08-03 13:05:21 +06:00
parent e375bc216f
commit 468ef84399
5 changed files with 55 additions and 5 deletions

View File

@@ -172,8 +172,10 @@ vnc_blit(int x, int y, int w, int h, int monitor_index)
uint32_t *p;
int yy;
if (monitor_index || (x < 0) || (y < 0) || (w <= 0) || (h <= 0) || (w > 2048) || (h > 2048) || (buffer32 == NULL))
return;
if (monitor_index || (x < 0) || (y < 0) || (w <= 0) || (h <= 0) || (w > 2048) || (h > 2048) || (buffer32 == NULL)) {
video_blit_complete_monitor(monitor_index);
return;
}
for (yy=0; yy<h; yy++) {
p = (uint32_t *)&(((uint32_t *)rfb->frameBuffer)[yy*VNC_MAX_X]);
@@ -185,7 +187,7 @@ vnc_blit(int x, int y, int w, int h, int monitor_index)
if (screenshots)
video_screenshot((uint32_t *) rfb->frameBuffer, 0, 0, VNC_MAX_X);
video_blit_complete();
video_blit_complete_monitor(monitor_index);
if (! updatingSize)
rfbMarkRectAsModified(rfb, 0,0, allowedX,allowedY);
@@ -210,7 +212,7 @@ vnc_init(UNUSED(void *arg))
32, 32, 0, 1, 255,255,255, 16, 8, 0, 0, 0
};
cgapal_rebuild();
cgapal_rebuild_monitor(0);
if (rfb == NULL) {
wcstombs(title, ui_window_title(NULL), sizeof(title));