summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index a313cc1..4cd8a6f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -30,9 +30,6 @@ int main(void)
phy_sim sim;
SDL_Thread *sim_thread;
- itc_test();
- return;
-
if (r_init()) {
con_printf("fatal error: renderer initialization failed\n");
rv = 1;
@@ -87,7 +84,11 @@ int main(void)
quit:
con_printf("main: exitting, rv=%i\n", rv);
+
+ itc_chan_push(&sim.ctl, PHY_CMD_QUIT, NULL);
+ SDL_WaitThread(sim_thread, NULL);
phy_sim_destroy(&sim);
+
ui_quit();
r_quit();
SDL_Quit();