aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorJack Jamison <jackqjamison@gmail.com>2025-10-18 01:40:58 -0400
committerJack Jamison <jackqjamison@gmail.com>2025-10-18 01:41:33 -0400
commit24fb6ee3b2d6e3c68410e439c7395f5058dabce5 (patch)
tree7defb2460e92b0019c26004110ed4f82d70466db /main.c
parent4ec95c0bc1223aee10449bf831d29f4f683faff7 (diff)
exit codes
Diffstat (limited to 'main.c')
-rw-r--r--main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/main.c b/main.c
index a85a74a..faf3be0 100644
--- a/main.c
+++ b/main.c
@@ -57,7 +57,7 @@ int main(int argc, char* argv[]) {
state.display = wl_display_connect(NULL);
if (!state.display) {
fprintf(stderr, "Failed to Connect to wayland display\n");
- return 0;
+ return EXIT_FAILURE;
}
// bind globals and roundtrip
@@ -72,7 +72,7 @@ int main(int argc, char* argv[]) {
// set up graphics
if (!init_gl(&state)) {
fprintf(stderr, "Failed to Initalize EGL/OpenGL\n");
- return 1;
+ return EXIT_FAILURE;
}
// create font altas textures
@@ -90,9 +90,12 @@ int main(int argc, char* argv[]) {
render_frame(&state);
}
+ // cleanup (of course)
if (state.items) {
array_free(state.items);
}
+
+ return state.exit_code;
}
void poll_events(client_state* state) {