From f27e2e52653b5dc2d7be43ba30de71dcf4c3428c Mon Sep 17 00:00:00 2001 From: vcaesar Date: Tue, 13 Nov 2018 12:43:04 -0400 Subject: [PATCH] add event status and update code style --- event/goEvent.h | 4 ++-- event/pub.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/event/goEvent.h b/event/goEvent.h index 0af6237..acd41cc 100644 --- a/event/goEvent.h +++ b/event/goEvent.h @@ -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; diff --git a/event/pub.h b/event/pub.h index 408f113..92f59a1 100644 --- a/event/pub.h +++ b/event/pub.h @@ -43,6 +43,7 @@ char *cevent; int rrevent; // uint16_t *cevent; int cstatus = 1; +int event_status; int stop_event();