Introduce a better fix for the Mac OS X backspace problem by adding the workaround to default-events.cpp.
svn-id: r43441
This commit is contained in:
parent
a718e608f4
commit
ce30a513ac
3 changed files with 6 additions and 11 deletions
|
@ -162,6 +162,12 @@ bool DefaultEventManager::pollEvent(Common::Event &event) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
else if (event.kbd.keycode == Common::KEYCODE_BACKSPACE) {
|
||||||
|
// WORKAROUND: On Mac OS X, the ascii value for backspace
|
||||||
|
// has to be set to the backspace keycode in order to work
|
||||||
|
// properly.
|
||||||
|
event.kbd.ascii = Common::KEYCODE_BACKSPACE;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Common::EVENT_KEYUP:
|
case Common::EVENT_KEYUP:
|
||||||
|
|
|
@ -499,10 +499,6 @@ void AGOSEngine::delay(uint amount) {
|
||||||
}
|
}
|
||||||
|
|
||||||
_keyPressed = event.kbd;
|
_keyPressed = event.kbd;
|
||||||
|
|
||||||
// Make sure backspace works right (this fixes a small issue on OS X)
|
|
||||||
if (_keyPressed.keycode == Common::KEYCODE_BACKSPACE)
|
|
||||||
_keyPressed.ascii = Common::KEYCODE_BACKSPACE;
|
|
||||||
break;
|
break;
|
||||||
case Common::EVENT_MOUSEMOVE:
|
case Common::EVENT_MOUSEMOVE:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -135,13 +135,6 @@ void ScummEngine::parseEvent(Common::Event event) {
|
||||||
// Normal key press, pass on to the game.
|
// Normal key press, pass on to the game.
|
||||||
_keyPressed = event.kbd;
|
_keyPressed = event.kbd;
|
||||||
}
|
}
|
||||||
|
|
||||||
// WORKAROUND: On Mac OS X, the ascii value has to be set to the
|
|
||||||
// backspace keycode in order for the backspace to work in HE games.
|
|
||||||
// This includes using the backspace when entering coach names
|
|
||||||
// in the backyard games.
|
|
||||||
if (_keyPressed.keycode == Common::KEYCODE_BACKSPACE)
|
|
||||||
_keyPressed.ascii = Common::KEYCODE_BACKSPACE;
|
|
||||||
|
|
||||||
// FIXME: We are using ASCII values to index the _keyDownMap here,
|
// FIXME: We are using ASCII values to index the _keyDownMap here,
|
||||||
// yet later one code which checks _keyDownMap will use KEYCODEs
|
// yet later one code which checks _keyDownMap will use KEYCODEs
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue