LAB: Start to untangle the mess in the event code

This commit is contained in:
Filippos Karapetis 2015-12-24 18:12:57 +02:00
parent 60657f9fd2
commit 9c749c7d2e
3 changed files with 25 additions and 61 deletions

View file

@ -118,7 +118,7 @@ IntuiMessage *EventManager::getMsg() {
updateMouse();
Common::KeyCode curKey;
Common::KeyCode curKey = keyPress();
if (_lastButtonHit) {
updateMouse();
@ -135,7 +135,7 @@ IntuiMessage *EventManager::getMsg() {
message._mouse.x /= 2;
_leftClick = _rightClick = false;
return &message;
} else if (keyPress(&curKey)) {
} else if (curKey != Common::KEYCODE_INVALID) {
message._code = curKey;
Button *curButton = checkNumButtonHit(_screenButtonList, message._code);