From e44d8729641b7aae0e4ea5fbb64ba9f1b8534f71 Mon Sep 17 00:00:00 2001 From: Shokunin <30949000+tetrisgm@users.noreply.github.com> Date: Wed, 7 Oct 2026 19:24:23 -0700 Subject: [PATCH] Release builds: define psx_debug_toggle_key so debug_key links debug_server.c is compiled in every build and its debug_key handler calls psx_debug_toggle_key, which existed only under #ifndef PSX_NO_DEBUG_TOOLS. Release now gets a stub that reports the keys as unavailable, like psx_debug_display_aspect. Co-Authored-By: Claude Opus 5.5 --- runtime/src/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/runtime/src/main.cpp b/runtime/src/main.cpp index 5cecb89c..29b2dd2a 100644 --- a/runtime/src/main.cpp +++ b/runtime/src/main.cpp @@ -9537,6 +9537,13 @@ extern "C" int psx_debug_toggle_key(int ch, char *out, int cap) { if (ch < '0' || ch > '9') return 0; return debug_toggle_key((int)(SDLK_0 + (ch - '0')), out, cap); } +#else +/* Release: the keys are compiled out; debug_server.c's debug_key still links. */ +extern "C" int psx_debug_toggle_key(int ch, char *out, int cap) { + (void)ch; + if (out && cap > 0) std::snprintf(out, (size_t)cap, "unavailable (debug tools not built)"); + return 0; +} #endif static void dynres_apply_level(int level) {