fix: debug logs were not appearing + added some useful debug logs + included exit code in error message

This commit is contained in:
2025-03-04 14:57:39 +01:00
parent 1d8a227180
commit a651eab53f
3 changed files with 9 additions and 3 deletions

View File

@@ -50,13 +50,17 @@ int32_t main(int32_t argc, char** argv) {
(void)argc, (void)argv;
init();
debug("successfully initialized!");
while (get_gamestatus() == STATUS_RUNNING)
update();
debug("done! starting to free resources...");
game_free(&gdat);
render_free(&rdat);
SDL_Quit();
return get_gamestatus();
gamestatus exit_code = get_gamestatus();
debug("quitting with an exit code of %u", exit_code);
return exit_code;
}