mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 17:33:05 +00:00
Merge pull request #740 from fuzzie/readline-dropevents
DEBUGGER: Drop events when using readline debugger
This commit is contained in:
commit
dc2726059c
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user