MCPcopy Create free account
hub / github.com/ading2210/linuxpdf / read_data

Function read_data

tinyemu/vmmouse.c:63–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63static void read_data(VMMouseState *s, uint32_t *regs, int size)
64{
65 int i;
66 if (size > 6 || size > s->fifo_count) {
67 // printf("vmmouse: read error req=%d count=%d\n", size, s->fifo_count);
68 s->enabled = FALSE;
69 return;
70 }
71 for(i = 0; i < size; i++) {
72 regs[i] = s->fifo_buf[s->fifo_rindex];
73 if (++s->fifo_rindex == FIFO_SIZE)
74 s->fifo_rindex = 0;
75 }
76 s->fifo_count -= size;
77}
78
79void vmmouse_send_mouse_event(VMMouseState *s, int x, int y, int dz,
80 int buttons)

Callers 1

vmmouse_handlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected