DIRECTOR: Handle keyDown in 1-ary processEvent

Might change semantics by calling the standard chain for input events.

That is what the D4 docs suggest anyway.
This commit is contained in:
Tobia Tesan 2017-06-21 10:51:06 +02:00 committed by Eugene Sandulenko
parent 137e10eef2
commit 3059c95abd
2 changed files with 5 additions and 1 deletions

View File

@ -110,7 +110,7 @@ void DirectorEngine::processEvents() {
warning("Keycode: %d", _keyCode);
}
_lingo->processEvent(kEventKeyDown, kGlobalScript, 0);
_lingo->processEvent(kEventKeyDown);
break;
default:

View File

@ -175,6 +175,10 @@ void Lingo::processInputEvent(LEvent event) {
else
g_lingo->processEvent(kEventNone, kFrameScript, currentFrame->_sprites[spriteId]->_scriptId);
}
if (event == kEventKeyDown) {
// TODO: is the above condition necessary or useful?
g_lingo->processEvent(event, kGlobalScript, 0);
}
runMovieScript(event);
}
}