summaryrefslogtreecommitdiff
path: root/procyon/source/bs/exit.c
blob: e49dfc9fdccc47ae64265d041eae8f3cdce27828 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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);
}