aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Hoops2009-08-16 14:04:54 +0000
committerMatthew Hoops2009-08-16 14:04:54 +0000
commitce30a513acdaab2ca5eacd136cc80ade1beabb3a (patch)
treef4d2d125f92a9df24976f78583978dad695ab365
parenta718e608f4dfa7206ebd41ea5fafa3ff736922a1 (diff)
downloadscummvm-rg350-ce30a513acdaab2ca5eacd136cc80ade1beabb3a.tar.gz
scummvm-rg350-ce30a513acdaab2ca5eacd136cc80ade1beabb3a.tar.bz2
scummvm-rg350-ce30a513acdaab2ca5eacd136cc80ade1beabb3a.zip
Introduce a better fix for the Mac OS X backspace problem by adding the workaround to default-events.cpp.
svn-id: r43441
-rw-r--r--backends/events/default/default-events.cpp6
-rw-r--r--engines/agos/event.cpp4
-rw-r--r--engines/scumm/input.cpp7
3 files changed, 6 insertions, 11 deletions
diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp
index 2efaec32f2..df85241da5 100644
--- a/backends/events/default/default-events.cpp
+++ b/backends/events/default/default-events.cpp
@@ -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:
diff --git a/engines/agos/event.cpp b/engines/agos/event.cpp
index cf84b78dc8..5ef65e7b42 100644
--- a/engines/agos/event.cpp
+++ b/engines/agos/event.cpp
@@ -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;
diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp
index 6523635643..ab32992b03 100644
--- a/engines/scumm/input.cpp
+++ b/engines/scumm/input.cpp
@@ -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