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
|
||||
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:
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -136,13 +136,6 @@ void ScummEngine::parseEvent(Common::Event event) {
|
|||
_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
|
||||
// to do so. That is, we are mixing ascii and keycode values here,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue