aboutsummaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorGravatar jonas <himself@jonasgunz.de> 2018-12-27 11:35:34 +0100
committerGravatar jonas <himself@jonasgunz.de> 2018-12-27 11:35:34 +0100
commit3cfea2815e3edfeb15fd7f0173957254babc7326 (patch)
treeb839575b6cbb0013b84e2ea4bb189193b807410f /main.cpp
parentf3772d321faae1cd72e577cea5b9fc75accd0700 (diff)
downloadtermgl-3cfea2815e3edfeb15fd7f0173957254babc7326.tar.gz
Added _EVENT_TERM to cInput
_EVENT_TERM is returned when Cmd + C is pressed
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp6
1 files changed, 6 insertions, 0 deletions
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);
}
}