From 745d5a072d8669d1bc35e7c1f28b75b3484542e8 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Wed, 30 Mar 2016 20:29:08 +0200 Subject: Finish ITC; implement async sim control. --- src/main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main.c') 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(); -- cgit