[Scummvm-git-logs] scummvm master -> 90f6d119cfa15a004cfe16a4155bb43ce5b7aa32

bluegr bluegr at gmail.com
Sun Feb 3 21:16:44 CET 2019


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
90f6d119cf GUI: Flush debugger prompts on text console


Commit: 90f6d119cfa15a004cfe16a4155bb43ce5b7aa32
    https://github.com/scummvm/scummvm/commit/90f6d119cfa15a004cfe16a4155bb43ce5b7aa32
Author: Vhati (tvtronix at yahoo.com)
Date: 2019-02-03T22:16:40+02:00

Commit Message:
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.

Changed paths:
    gui/debugger.cpp


diff --git a/gui/debugger.cpp b/gui/debugger.cpp
index febd103..43f6009 100644
--- a/gui/debugger.cpp
+++ b/gui/debugger.cpp
@@ -257,6 +257,7 @@ void Debugger::enter() {
 
 	do {
 		printf("debug> ");
+		::fflush(stdout);
 		if (!fgets(buf, sizeof(buf), stdin))
 			return;
 





More information about the Scummvm-git-logs mailing list