aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorThierry Crozat2019-07-07 11:06:28 +0100
committerThierry Crozat2019-07-07 11:06:28 +0100
commitd8cb826b1951e08d04fb3a790daf0e4a62db114c (patch)
treec3bc3621b03e943a2de1f92295344a78f7f8e001 /backends
parent76d48168537644e6f8e3900e292f04c7880c53c1 (diff)
downloadscummvm-rg350-d8cb826b1951e08d04fb3a790daf0e4a62db114c.tar.gz
scummvm-rg350-d8cb826b1951e08d04fb3a790daf0e4a62db114c.tar.bz2
scummvm-rg350-d8cb826b1951e08d04fb3a790daf0e4a62db114c.zip
IOS7: Add back mapping of LF character to the Return key
This is necessary for properly identifying the Return key pressed from the software or a hardware keyboard, and this was erronously removed in commit e5709ed.
Diffstat (limited to 'backends')
-rw-r--r--backends/platform/ios7/ios7_osys_events.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/backends/platform/ios7/ios7_osys_events.cpp b/backends/platform/ios7/ios7_osys_events.cpp
index a7e007ea42..0387503739 100644
--- a/backends/platform/ios7/ios7_osys_events.cpp
+++ b/backends/platform/ios7/ios7_osys_events.cpp
@@ -389,6 +389,12 @@ void OSystem_iOS7::handleEvent_keyPressed(Common::Event &event, int keyPressed)
int ascii = keyPressed;
//printf("key: %i\n", keyPressed);
+ // Map LF character to Return key/CR character
+ if (keyPressed == 10) {
+ keyPressed = Common::KEYCODE_RETURN;
+ ascii = Common::ASCII_RETURN;
+ }
+
event.type = Common::EVENT_KEYDOWN;
_queuedInputEvent.type = Common::EVENT_KEYUP;