mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-17 06:05:44 +01:00
add quit in main.c to atexit, for added safety
This commit is contained in:
@@ -31,13 +31,15 @@ static inline int init(void) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void quit(void) {
|
static void quit(void) {
|
||||||
glfwTerminate();
|
glfwTerminate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
(void)argc, (void)argv;
|
(void)argc, (void)argv;
|
||||||
printf("debug: [DBG], info: [INF], warning: [WAR], error: [ERR], fatal: [FAT]\n");
|
printf("debug: [DBG], info: [INF], warning: [WAR], error: [ERR], fatal: [FAT]\n");
|
||||||
|
atexit(quit);
|
||||||
if (init()) fatal("failed to initialize!");
|
if (init()) fatal("failed to initialize!");
|
||||||
|
|
||||||
window_loop();
|
window_loop();
|
||||||
|
|||||||
Reference in New Issue
Block a user