From 2f5dfa99f49639148f706bacdb3a9e3897bea4b5 Mon Sep 17 00:00:00 2001 From: hedara90 <90hedara@gmail.com> Date: Thu, 20 Nov 2025 22:14:34 +0100 Subject: [PATCH] Make `gTestRunnerHeadless` into a constant outside of tests (#8306) Co-authored-by: Hedara --- include/test_runner.h | 4 ++++ src/test_runner_stub.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/include/test_runner.h b/include/test_runner.h index 9e0d96ff5b..b7aa69a076 100644 --- a/include/test_runner.h +++ b/include/test_runner.h @@ -2,7 +2,11 @@ #define GUARD_TEST_RUNNER_H extern const bool8 gTestRunnerEnabled; +#if TESTING extern const bool8 gTestRunnerHeadless; +#else +#define gTestRunnerHeadless FALSE +#endif extern const bool8 gTestRunnerSkipIsFail; #if TESTING diff --git a/src/test_runner_stub.c b/src/test_runner_stub.c index 9a9452ed21..20aabe3d9a 100644 --- a/src/test_runner_stub.c +++ b/src/test_runner_stub.c @@ -7,5 +7,7 @@ const bool8 gTestRunnerEnabled = FALSE; // The Makefile patches gTestRunnerHeadless as part of make test. // This allows us to open the ROM in an mgba with a UI and see the // animations and messages play, which helps when debugging a test. +#if TESTING const bool8 gTestRunnerHeadless = FALSE; +#endif const bool8 gTestRunnerSkipIsFail = FALSE;