summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2016-03-30 20:29:08 +0200
committerPaweł Redman <pawel.redman@gmail.com>2016-03-30 20:29:08 +0200
commit745d5a072d8669d1bc35e7c1f28b75b3484542e8 (patch)
treeecc9cbd03511764e79251ec256c81cb8796f7c36 /src/main.c
parentbc50836fdcd20fda174df392c264cc6f03030cdf (diff)
Finish ITC; implement async sim control.
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();