diff --git a/conway.c b/conway.c index a9253af..c3c1b7a 100644 --- a/conway.c +++ b/conway.c @@ -63,6 +63,7 @@ int main(int argc, char **argv) { tb_select_input_mode(TB_INPUT_MOUSE); int flipflop = 0; + // Cells are 2 characters wide so they look square int W = tb_width()/2, H = tb_height(); char *buffers[2]; resize: @@ -84,7 +85,7 @@ int main(int argc, char **argv) { while (tb_peek_event(&ev, 0)) { switch (ev.type) { case TB_EVENT_RESIZE: - W = tb_width()/2, H = tb_height(); + W = ev.w/2, H = ev.h; goto resize; case TB_EVENT_KEY: