diff --git a/docs/internal/upstream/douglas-pr15-one-frame-press.md b/docs/internal/upstream/douglas-pr15-one-frame-press.md new file mode 100644 index 00000000..491b054a --- /dev/null +++ b/docs/internal/upstream/douglas-pr15-one-frame-press.md @@ -0,0 +1,8 @@ +# One-frame debug input pulse + +Source: [PSXRecomp PR #15](https://github.com/mstan/psxrecomp/pull/15), +commit [`f44f365eb91a30396f05f0f52529d4b01b026099`](https://github.com/douglasjv/psxrecomp-tweaks/commit/f44f365eb91a30396f05f0f52529d4b01b026099). + +This branch isolates the fix that returns an armed input pulse before consuming +its final frame. Widescreen signed bounds and unrelated debug tooling from the +source commit are excluded. diff --git a/runtime/src/debug_server.c b/runtime/src/debug_server.c index ff8a231d..41864798 100644 --- a/runtime/src/debug_server.c +++ b/runtime/src/debug_server.c @@ -12916,11 +12916,12 @@ int debug_server_is_connected(void) int debug_server_get_input_override(void) { + int current = s_input_override; if (s_input_override >= 0 && s_input_frames > 0) { if (--s_input_frames == 0) s_input_override = -1; } - return s_input_override; + return current; } int debug_server_get_axis_override(unsigned char st[4])