commit c27689dfdcd725246731d4f28a5548ff6818f43b
parent 33995e119a16fbf13c51cf3a72a6cc52d70a75a8
Author: Louis Burda <quent.burda@gmail.com>
Date: Sun, 30 Jul 2023 22:38:16 +0200
Adjust rendering to centered box drawing characters
Diffstat:
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/tis100-curses.c b/tis100-curses.c
@@ -20,11 +20,10 @@
#define TPU_INPUT_ROWS 15
#define TPU_INPUT_COLS 19
-#define TPU_INFO_W 6
+#define TPU_INFO_W 7
#define TPU_INFO_H 4
-#define TPU_CNT 6
-#define TPU_W (TPU_INPUT_COLS + 2 + 6)
-#define TPU_H (TPU_INPUT_ROWS + 2)
+#define TPU_W (1 + TPU_INPUT_COLS + TPU_INFO_W)
+#define TPU_H (1 + TPU_INPUT_ROWS + 1)
#define TIMEOUT 50
@@ -278,10 +277,10 @@ tui_draw_tpu(struct tpu *tpu)
if (port->out_set)
tui_draw_lit(sx + TPU_W, sy + 5, A_BOLD, port->out);
if (port->type & PORT_OUT)
- tui_draw_wch(sx + TPU_W + 1, sy + 7,
+ tui_draw_wch(sx + TPU_W, sy + 7,
port->out_set ? A_BOLD : 0, WACS_RARROW);
if (port->type & PORT_IN)
- tui_draw_wch(sx + TPU_W + 1, sy + 8,
+ tui_draw_wch(sx + TPU_W, sy + 8,
port->in_set ? A_BOLD : 0, WACS_LARROW);
if (port->in_set)
tui_draw_lit(sx + TPU_W, sy + 9, A_BOLD, port->in);
@@ -485,7 +484,7 @@ main(int argc, const char **argv)
ifd = inotify_init1(IN_NONBLOCK);
- reset(ifd, argc, argv, true);
+ reset(ifd, argc, argv, true);
quit = false;
while (!quit) {