From fa84dfb895d5f3965b2c791b477a1dcc6b4eef7b Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Sun, 8 Sep 2019 10:49:22 +0200 Subject: TRACE & DEBUG, 80x24x24fps, still troubles with render to texture Tidy TRACE and DEBUG for cacaserver use or ncurses (no spurious printf). Switch to 80x24 at 24fps for bandwidth (4 Mbps) Colors are OK with xterm, but not with gnome-terminal --- src/main.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/main.h') diff --git a/src/main.h b/src/main.h index 313dabf..3af6815 100644 --- a/src/main.h +++ b/src/main.h @@ -8,15 +8,18 @@ #include #include -#define FBUF_W 256 -#define FBUF_H 256 +#define EXPR_MIN_SIZE (shm->ge.w<80 || shm->ge.h<24) +#define TEXT_MIN_SIZE "80x24" +// 80x24 xterm as rendered on Debian 10 (size doen't matter so much, keep the right ratio) +#define FBUF_W 478 +#define FBUF_H 371 #ifdef DEBUG -#define TRACE(hint) do { printf("%s(): %s\n", __func__, hint); fflush(stdout); } while(0) -#define TRACE_ONCE(hint) if (firsttime) { printf("%s(): %s\n", __func__, hint); fflush(stdout); firsttime=0; } +#define TRACE(hint) do { printf("%s(): %s\n", __func__, hint); } while(0) +#define TRACE_CALL_ONCE static int firsttime=1; if (firsttime) { printf("%s(): %s\n", __func__, "call"); firsttime=0; } #else #define TRACE(hint) -#define TRACE_ONCE(hint) +#define TRACE_CALL_ONCE #endif typedef struct { -- cgit v1.2.3