From e24186fc1917c5e8b91924af0c3c7c55816ff5d6 Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Mon, 25 Jan 2021 22:01:00 +0100 Subject: Introducing MIC --- src/main.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/main.c (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..52728ef --- /dev/null +++ b/src/main.c @@ -0,0 +1,25 @@ +#include "platform_posix.c" + +int +main(void) { + // App initialization. + AppAPI api = {0}; + AppState state = {0}; + if (!_app_init(&api, &state, PLATFORM_API)) { + return EXIT_FAILURE; + } + + // Main loop. + for (;;) { + if (!_app_reload(&api, &state, PLATFORM_API)) { + continue; + } + if (!api.step(&state, PLATFORM_API)) { + break; + } + } + + // Cleanup. + _app_destroy(&api, &state, PLATFORM_API); + return EXIT_SUCCESS; +} -- cgit v1.2.1