aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorMax Horn2009-09-01 13:02:24 +0000
committerMax Horn2009-09-01 13:02:24 +0000
commit2ed53f98b478854c1df3ed43a46103bfb35596d5 (patch)
treea45e2b37ba15d1268a04ca75c9391c65bf0e6e03 /backends
parent197e68ef2ac0af202046130a7af7ef4f32aa831f (diff)
downloadscummvm-rg350-2ed53f98b478854c1df3ed43a46103bfb35596d5.tar.gz
scummvm-rg350-2ed53f98b478854c1df3ed43a46103bfb35596d5.tar.bz2
scummvm-rg350-2ed53f98b478854c1df3ed43a46103bfb35596d5.zip
Clarified the backspace key workaround: This is not a Mac OS X issue (as the comment used to imply) but rather an issue in some game engines.
svn-id: r43880
Diffstat (limited to 'backends')
-rw-r--r--backends/events/default/default-events.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp
index df85241da5..8b3fe5cdc4 100644
--- a/backends/events/default/default-events.cpp
+++ b/backends/events/default/default-events.cpp
@@ -163,9 +163,13 @@ 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.
+ // WORKAROUND: Some engines incorrectly attempt to use the
+ // ascii value instead of the keycode to detect the backspace
+ // key (a non-portable behavior). This fails at least on
+ // Mac OS X, possibly also on other systems.
+ // As a workaround, we force the ascii value for backspace
+ // key pressed. A better fix would be for engines to stop
+ // making invalid assumptions about ascii values.
event.kbd.ascii = Common::KEYCODE_BACKSPACE;
}
break;