mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-17 03:25:45 +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;
|
||||
}
|
||||
|
||||
static inline void quit(void) {
|
||||
static void quit(void) {
|
||||
glfwTerminate();
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
(void)argc, (void)argv;
|
||||
printf("debug: [DBG], info: [INF], warning: [WAR], error: [ERR], fatal: [FAT]\n");
|
||||
atexit(quit);
|
||||
if (init()) fatal("failed to initialize!");
|
||||
|
||||
window_loop();
|
||||
|
||||
Reference in New Issue
Block a user