mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
GUI: Flush debugger prompts on text console
When built with enable-text-console and disable-readline, flushing output immediately after printing the debugger prompt, before waiting for input, ensures that external tools can spawn ScummVM, detect the prompt, and pipe in automated responses (e.g., expect scripts). Explicit flushing was necessary at least on Windows, where support for automating terminal input is less sophisticated. Otherwise, the prompt string doesn't make it through the pipe, and both the script and ScummVM get stuck waiting for input.
This commit is contained in:
parent
4129da510e
commit
90f6d119cf
@ -257,6 +257,7 @@ void Debugger::enter() {
|
||||
|
||||
do {
|
||||
printf("debug> ");
|
||||
::fflush(stdout);
|
||||
if (!fgets(buf, sizeof(buf), stdin))
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user