summaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2019-09-08 10:49:22 +0200
committerLudovic Pouzenc <ludovic@pouzenc.fr>2019-09-08 10:49:22 +0200
commitfa84dfb895d5f3965b2c791b477a1dcc6b4eef7b (patch)
treef0776a4fc67070b5d83e600fca303e5f9cded9bf /src/main.h
parenta5338c572975a82b9efbf95755103176ebbb67a8 (diff)
downloaddemoscene-eo-fa84dfb895d5f3965b2c791b477a1dcc6b4eef7b.tar.gz
demoscene-eo-fa84dfb895d5f3965b2c791b477a1dcc6b4eef7b.tar.bz2
demoscene-eo-fa84dfb895d5f3965b2c791b477a1dcc6b4eef7b.zip
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
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h13
1 files changed, 8 insertions, 5 deletions
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 <SDL2/SDL_opengl.h>
#include <GL/glu.h>
-#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 {