Fixing demos
This commit is contained in:
parent
fcd6318153
commit
1c7948b926
2 changed files with 3 additions and 3 deletions
|
@ -84,7 +84,7 @@ int main(void) {
|
||||||
|
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
ginputGetMouseStatus(0, &ev);
|
ginputGetMouseStatus(0, &ev);
|
||||||
if (!(ev.current_buttons & GINPUT_MOUSE_BTN_LEFT))
|
if (!(ev.buttons & GINPUT_MOUSE_BTN_LEFT))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* inside color box ? */
|
/* inside color box ? */
|
||||||
|
|
|
@ -203,7 +203,7 @@ static bool_t sendpkt(uint16_t *pkt, int len) {
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Nothing to do if the mouse data has not changed
|
// Nothing to do if the mouse data has not changed
|
||||||
if (lx == pem->x && ly == pem->y && lbuttons == pem->current_buttons)
|
if (lx == pem->x && ly == pem->y && lbuttons == pem->buttons)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Transfer mouse data that has changed
|
// Transfer mouse data that has changed
|
||||||
|
@ -220,7 +220,7 @@ static bool_t sendpkt(uint16_t *pkt, int len) {
|
||||||
sendpkt(cmd, 2);
|
sendpkt(cmd, 2);
|
||||||
}
|
}
|
||||||
// We always send the buttons as it also acts as a mouse sync signal
|
// We always send the buttons as it also acts as a mouse sync signal
|
||||||
lbuttons = pem->current_buttons;
|
lbuttons = pem->buttons;
|
||||||
cmd[0] = GNETCODE_MOUSE_B;
|
cmd[0] = GNETCODE_MOUSE_B;
|
||||||
cmd[1] = lbuttons;
|
cmd[1] = lbuttons;
|
||||||
sendpkt(cmd, 2);
|
sendpkt(cmd, 2);
|
||||||
|
|
Loading…
Add table
Reference in a new issue