add event status and update code style

This commit is contained in:
vcaesar 2018-11-13 12:43:04 -04:00
parent 602a6294ff
commit f27e2e5265
2 changed files with 3 additions and 2 deletions

View File

@ -49,7 +49,7 @@ void dispatch_proc(iohook_event * const event) {
snprintf(buffer + length, sizeof(buffer) - length,
",keycode=%u,rawcode=0x%X",
event->data.keyboard.keycode, event->data.keyboard.rawcode);
int akeyCode = (uint16_t) event->data.keyboard.keycode;
int key_code = (uint16_t) event->data.keyboard.keycode;
if (event->data.keyboard.keycode == VC_ESCAPE
&& atoi(cevent) == 11) {
@ -59,7 +59,7 @@ void dispatch_proc(iohook_event * const event) {
}
// printf("atoi(str)---%d\n", atoi(cevent));
if (akeyCode == atoi(cevent)) {
if (key_code == atoi(cevent)) {
int stopEvent = stop_event();
// printf("%d\n", stopEvent);
cstatus = 0;

View File

@ -43,6 +43,7 @@ char *cevent;
int rrevent;
// uint16_t *cevent;
int cstatus = 1;
int event_status;
int stop_event();