aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorFilippos Karapetis2010-08-21 11:11:54 +0000
committerFilippos Karapetis2010-08-21 11:11:54 +0000
commit2c8946f392f08b05c023b5ed3a92319ca2401dae (patch)
tree0b9006085740362ad7c316cc22f33f2aef6c7421 /engines/sci
parentc4d58a8d886b79c74f555523e21b1b2aa8dd5081 (diff)
downloadscummvm-rg350-2c8946f392f08b05c023b5ed3a92319ca2401dae.tar.gz
scummvm-rg350-2c8946f392f08b05c023b5ed3a92319ca2401dae.tar.bz2
scummvm-rg350-2c8946f392f08b05c023b5ed3a92319ca2401dae.zip
SCI: add support for Control-C in earlier SCI games, too
svn-id: r52254
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/graphics/controls.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/engines/sci/graphics/controls.cpp b/engines/sci/graphics/controls.cpp
index 6cdf2e4e9d..f917f8291c 100644
--- a/engines/sci/graphics/controls.cpp
+++ b/engines/sci/graphics/controls.cpp
@@ -197,7 +197,7 @@ void GfxControls::kernelTexteditChange(reg_t controlObject, reg_t eventObject) {
cursorPos++; textChanged = true;
}
break;
- case 3: // a bit odd, but this is what is returned when Control - C is pressed
+ case 3: // returned in SCI1 late and newer when Control - C is pressed
if (modifiers & SCI_KEYMOD_CTRL) {
// Control-C erases the whole line
cursorPos = 0; text.clear();
@@ -205,7 +205,12 @@ void GfxControls::kernelTexteditChange(reg_t controlObject, reg_t eventObject) {
}
break;
default:
- if (eventKey > 31 && eventKey < 256 && textSize < maxChars) {
+ if ((modifiers & SCI_KEYMOD_CTRL) && eventKey == 99) {
+ // Control-C in earlier SCI games (SCI0 - SCI1 middle)
+ // Control-C erases the whole line
+ cursorPos = 0; text.clear();
+ textChanged = true;
+ } else if (eventKey > 31 && eventKey < 256 && textSize < maxChars) {
// insert pressed character
textAddChar = true;
textChanged = true;