This commit is contained in:
JerryXiao 2023-04-26 00:55:01 +08:00
parent eb8bcbad8b
commit 222b8fbdc4
Signed by: Jerry
GPG key ID: 22618F758B5BE2E5

View file

@ -267,7 +267,7 @@ static void rfb_ptr_hook(int mask, int screen_x, int screen_y, rfbClientPtr cl)
{ {
.type = EV_REL, .type = EV_REL,
.code = REL_WHEEL, .code = REL_WHEEL,
.value = mask & 0b1000 ? -1 : 1, .value = mask & 0b1000 ? 1 : -1,
}, },
{ {
.type = EV_SYN, .type = EV_SYN,
@ -424,16 +424,11 @@ int main(int argc, const char **argv)
} }
else { else {
if (strcmp(drm_ver->name, "nvidia-drm") == 0) { if (strcmp(drm_ver->name, "nvidia-drm") == 0) {
// quirky // quirky and slow
convert_func = &convert_nv_stripe; convert_func = &convert_nv_stripe;
vblank_func = &drm_wait_vblank_noop; vblank_func = &drm_wait_vblank_noop;
} }
else if (strcmp(drm_ver->name, "vmwgfx") == 0) { else if (strcmp(drm_ver->name, "vmwgfx") == 0 || strcmp(drm_ver->name, "vboxvideo") == 0 || strcmp(drm_ver->name, "virtio_gpu") == 0) {
}
else if (strcmp(drm_ver->name, "vboxvideo") == 0) {
vblank_func = &drm_wait_vblank_noop;
}
else if (strcmp(drm_ver->name, "virtio_gpu") == 0) {
// virgl does not work // virgl does not work
vblank_func = &drm_wait_vblank_noop; vblank_func = &drm_wait_vblank_noop;
} }