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:
Matthew Hoops
2009-08-16 14:04:54 +00:00
parent a718e608f4
commit ce30a513ac
3 changed files with 6 additions and 11 deletions
@@ -162,6 +162,12 @@ bool DefaultEventManager::pollEvent(Common::Event &event) {
}
}
#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;
case Common::EVENT_KEYUP:
-4
View File
@@ -499,10 +499,6 @@ void AGOSEngine::delay(uint amount) {
}
_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;
case Common::EVENT_MOUSEMOVE:
break;
-7
View File
@@ -135,13 +135,6 @@ void ScummEngine::parseEvent(Common::Event event) {
// Normal key press, pass on to the game.
_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,
// yet later one code which checks _keyDownMap will use KEYCODEs