[Scummvm-cvs-logs] scummvm master -> dc2726059cc666d5a3a3a9b5080671542cb1b1cc

sev- sev at scummvm.org
Sun Apr 17 14:59:06 CEST 2016


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

Summary:
8aee3cffdc DEBUGGER: Drop events when using readline debugger
dc2726059c Merge pull request #740 from fuzzie/readline-dropevents


Commit: 8aee3cffdcca851de6ee515d896342f863f85538
    https://github.com/scummvm/scummvm/commit/8aee3cffdcca851de6ee515d896342f863f85538
Author: Alyssa Milburn (fuzzie at fuzzie.org)
Date: 2016-04-01T14:49:25+02:00

Commit Message:
DEBUGGER: Drop events when using readline debugger

This should avoid the readline debugger causing Windows to decide that
ScummVM is unresponsive, by dropping incoming events in the idle callback.

Changed paths:
    gui/debugger.cpp



diff --git a/gui/debugger.cpp b/gui/debugger.cpp
index c9b4359..72d05e2 100644
--- a/gui/debugger.cpp
+++ b/gui/debugger.cpp
@@ -42,6 +42,7 @@
 #elif defined(USE_READLINE)
 	#include <readline/readline.h>
 	#include <readline/history.h>
+	#include "common/events.h"
 #endif
 
 
@@ -191,6 +192,15 @@ char *readline_completionFunction(const char *text, int state) {
 	return g_readline_debugger->readlineComplete(text, state);
 }
 
+void readline_eventFunction() {
+	Common::EventManager *eventMan = g_system->getEventManager();
+
+	Common::Event event;
+	while (eventMan->pollEvent(event)) {
+		// drop all events
+	}
+}
+
 #ifdef USE_READLINE_INT_COMPLETION
 typedef int RLCompFunc_t(const char *, int);
 #else
@@ -228,6 +238,7 @@ void Debugger::enter() {
 
 	g_readline_debugger = this;
 	rl_completion_entry_function = (RLCompFunc_t *)&readline_completionFunction;
+	rl_event_hook = (rl_hook_func_t *)&readline_eventFunction;
 
 	char *line_read = 0;
 	do {


Commit: dc2726059cc666d5a3a3a9b5080671542cb1b1cc
    https://github.com/scummvm/scummvm/commit/dc2726059cc666d5a3a3a9b5080671542cb1b1cc
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-04-17T14:59:03+02:00

Commit Message:
Merge pull request #740 from fuzzie/readline-dropevents

DEBUGGER: Drop events when using readline debugger

Changed paths:
    gui/debugger.cpp









More information about the Scummvm-git-logs mailing list