aboutsummaryrefslogtreecommitdiff
path: root/engines/agos
diff options
context:
space:
mode:
authorTorbjörn Andersson2007-03-17 15:44:26 +0000
committerTorbjörn Andersson2007-03-17 15:44:26 +0000
commit53624376b4d614689695d1ea56c1052cd0e7ad12 (patch)
treec98fc0e637f6634d270ae0b6e5311852e3634811 /engines/agos
parente72455c215a1deebe235d18e7efbe55f76d8f2da (diff)
downloadscummvm-rg350-53624376b4d614689695d1ea56c1052cd0e7ad12.tar.gz
scummvm-rg350-53624376b4d614689695d1ea56c1052cd0e7ad12.tar.bz2
scummvm-rg350-53624376b4d614689695d1ea56c1052cd0e7ad12.zip
Applied my re-revised patch #1487149 ("Simplified keyboard repeat"), with
Fingolfin's blessings. Keyboard repeat is now handled by the event manager, rather than by individual engines. Since this can cause problems with some engines (see the AGI engine), the extra "key down" events are marked as "synthetic", so that they can be ignored if necessary. svn-id: r26170
Diffstat (limited to 'engines/agos')
-rw-r--r--engines/agos/agos.cpp2
-rw-r--r--engines/agos/agos.h2
-rw-r--r--engines/agos/event.cpp12
3 files changed, 0 insertions, 16 deletions
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp
index 851b089020..95727a6a6f 100644
--- a/engines/agos/agos.cpp
+++ b/engines/agos/agos.cpp
@@ -81,8 +81,6 @@ AGOSEngine::AGOSEngine(OSystem *syst)
_debugger = 0;
_keyPressed = 0;
- _keyRepeatKey = 0;
- _keyRepeatTime = 0;
_gameFile = 0;
diff --git a/engines/agos/agos.h b/engines/agos/agos.h
index 1bb2790fab..10fb0ddec5 100644
--- a/engines/agos/agos.h
+++ b/engines/agos/agos.h
@@ -200,8 +200,6 @@ protected:
const GameSpecificSettings *gss;
byte _keyPressed;
- byte _keyRepeatKey;
- uint32 _keyRepeatTime;
typedef enum {
FORMAT_NONE,
diff --git a/engines/agos/event.cpp b/engines/agos/event.cpp
index 7008d9a04e..4d8f8189ed 100644
--- a/engines/agos/event.cpp
+++ b/engines/agos/event.cpp
@@ -375,13 +375,6 @@ void AGOSEngine::delay(uint amount) {
_keyPressed = 8;
else
_keyPressed = (byte)event.kbd.ascii;
-
- _keyRepeatTime = _system->getMillis() + 400;
- _keyRepeatKey = _keyPressed;
- break;
- case OSystem::EVENT_KEYUP:
- _keyRepeatKey = 0;
- _keyRepeatTime = 0;
break;
case OSystem::EVENT_MOUSEMOVE:
_sdlMouseX = event.mouse.x;
@@ -435,11 +428,6 @@ void AGOSEngine::delay(uint amount) {
cur = _system->getMillis();
} while (cur < start + amount);
-
- if (_keyPressed == 0 && _keyRepeatKey != 0 && _keyRepeatTime != 0 && cur >= _keyRepeatTime) {
- _keyPressed = _keyRepeatKey;
- _keyRepeatTime = cur + 100;
- }
}
void AGOSEngine::timer_callback() {