From 3cfea2815e3edfeb15fd7f0173957254babc7326 Mon Sep 17 00:00:00 2001 From: jonas Date: Thu, 27 Dec 2018 11:35:34 +0100 Subject: Added _EVENT_TERM to cInput _EVENT_TERM is returned when Cmd + C is pressed --- main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index f0f6f50..786194a 100644 --- a/main.cpp +++ b/main.cpp @@ -42,10 +42,16 @@ int main() pos.x = ie.x; pos.y = ie.y; } + else if (ie.type == _EVENT_TERM) + { + return 0; + } a.clear(); a.drawPoint('X', pos, true, _COL_GREEN); a.render(); + + usleep(10*1000); } } -- cgit v1.2.3