mirror of
https://github.com/robotn/gohook.git
synced 2024-11-22 02:56:54 +08:00
Fixed run code in mac warning
This commit is contained in:
parent
8d5c932532
commit
ab3379003d
@ -31,7 +31,7 @@ void dispatch_proc(iohook_event * const event) {
|
|||||||
case EVENT_KEY_RELEASED:
|
case EVENT_KEY_RELEASED:
|
||||||
case EVENT_KEY_TYPED:
|
case EVENT_KEY_TYPED:
|
||||||
sprintf(buffer,
|
sprintf(buffer,
|
||||||
"{\"id\":%i,\"time\":%" PRIu64 ",\"mask\":%hu,\"reserved\":%hu,\"keycode\":%hu,\"rawcode\":%hu,\"keychar\":%hu}",
|
"{\"id\":%i,\"time\":%" PRIu64 ",\"mask\":%hu,\"reserved\":%hu,\"keycode\":%hu,\"rawcode\":%hu,\"keychar\":%d}",
|
||||||
event->type, event->time, event->mask,event->reserved,
|
event->type, event->time, event->mask,event->reserved,
|
||||||
event->data.keyboard.keycode,
|
event->data.keyboard.keycode,
|
||||||
event->data.keyboard.rawcode,
|
event->data.keyboard.rawcode,
|
||||||
@ -52,7 +52,7 @@ void dispatch_proc(iohook_event * const event) {
|
|||||||
break;
|
break;
|
||||||
case EVENT_MOUSE_WHEEL:
|
case EVENT_MOUSE_WHEEL:
|
||||||
sprintf(buffer,
|
sprintf(buffer,
|
||||||
"{\"id\":%i,\"time\":%" PRIu64 ",\"mask\":%hu,\"reserved\":%hu,\"clicks\":%hu,\"x\":%hd,\"y\":%hd,\"type\":%hu,\"ammount\":%hu,\"rotation\":%hd,\"direction\":%hu}",
|
"{\"id\":%i,\"time\":%" PRIu64 ",\"mask\":%hu,\"reserved\":%hu,\"clicks\":%hu,\"x\":%hd,\"y\":%hd,\"type\":%d,\"ammount\":%hu,\"rotation\":%hu,\"direction\":%d}",
|
||||||
event->type, event->time, event->mask, event->reserved,
|
event->type, event->time, event->mask, event->reserved,
|
||||||
event->data.wheel.clicks,
|
event->data.wheel.clicks,
|
||||||
event->data.wheel.x,
|
event->data.wheel.x,
|
||||||
|
Loading…
Reference in New Issue
Block a user