aboutsummaryrefslogtreecommitdiff
path: root/sources/TZR_LatestInputEvent.c
diff options
context:
space:
mode:
Diffstat (limited to 'sources/TZR_LatestInputEvent.c')
-rw-r--r--sources/TZR_LatestInputEvent.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sources/TZR_LatestInputEvent.c b/sources/TZR_LatestInputEvent.c
new file mode 100644
index 0000000..550e2c3
--- /dev/null
+++ b/sources/TZR_LatestInputEvent.c
@@ -0,0 +1,15 @@
+#include "TZR_events.h"
+#include "TZR_globals.h"
+
+int
+TZR_LatestInputEvent(TZR_Event *e)
+{
+ if (e == NULL) {
+ TZR_Log("e is NULL");
+ return 0;
+ }
+ if (___tzr_latest_input.type == TZR_EV_NONE)
+ return 0;
+ *e = ___tzr_latest_input;
+ return 1;
+}