mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
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:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user