From f217b53b02982d86c555b235964822952c2dc07f Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 11 Sep 2026 19:35:12 +0200 Subject: [PATCH] fix presentation for MinGW --- rogueviz/presentation.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rogueviz/presentation.cpp b/rogueviz/presentation.cpp index 0066e484..93ac37c0 100644 --- a/rogueviz/presentation.cpp +++ b/rogueviz/presentation.cpp @@ -228,6 +228,10 @@ string gen_latex(presmode mode, string s, int res, flagtype flags) { fclose(f); hr::ignore(system("cd latex-cache; pdflatex rogueviz-latex.tex")); int test_pdftopng = system("pdftopng -v > /dev/null 2>&1"); +// in MinGW there is no WEXITSTATUS, the value is returned directly +#ifndef WEXITSTATUS +#define WEXITSTATUS(x) x +#endif bool has_working_pdftopng = test_pdftopng == 0 || WEXITSTATUS(test_pdftopng) == 99; string pdftopng_command = has_working_pdftopng ? "pdftopng" : "pdftoppm -png"; string pngline =