summaryrefslogtreecommitdiff
path: root/procyon/source/bs/exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'procyon/source/bs/exit.c')
-rw-r--r--procyon/source/bs/exit.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/procyon/source/bs/exit.c b/procyon/source/bs/exit.c
new file mode 100644
index 0000000..e49dfc9
--- /dev/null
+++ b/procyon/source/bs/exit.c
@@ -0,0 +1,15 @@
+#include <acm/bs.h>
+
+#include <GLFW/glfw3.h>
+#include <stdlib.h>
+
+void acm_exit(acm_stat const _stat) {
+ int const cstat = _stat == acm_stat_ok ? EXIT_SUCCESS : EXIT_FAILURE;
+ free((void *)acm_dat.savloc);
+ if (acm_dat.gfxisinit) {
+ glfwDestroyWindow(acm_dat.win);
+ glfwTerminate();
+ }
+ acm_log("Done (%X)\n",cstat);
+ exit(cstat);
+}