From f59f58169bdbcd72184053c0db49da5ddb4f53e3 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sat, 10 Dec 2022 12:59:12 -0800 Subject: ansr-text: add some debug prints for SAUCE metadata PabloDraw seems to randomly omit the SAUCE metadata when I save files, so adding some instrumentation for better visibility into these things @ runtime on debug builds. --- src/ansr-tex.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ansr-tex.c b/src/ansr-tex.c index 46d6d00..0b392d4 100644 --- a/src/ansr-tex.c +++ b/src/ansr-tex.c @@ -96,7 +96,10 @@ static ansr_t * ansr_from_file(const char *path) if (!f) return NULL; - (void) ansr_get_sauce_dimensions(f, &conf.screen_width, NULL); + debug_if(ansr_get_sauce_dimensions(f, &conf.screen_width, NULL) < 0, + "No SAUCE metadata for \"%s\"", path); + + debugf("\"%s\" %u wide", path, conf.screen_width); a = ansr_new(&conf, NULL, 0); if (!a) { -- cgit v1.2.3