From 47ae7506fc1e286cbce74f1126fa016f31d71996 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 18 Sep 2006 12:13:40 +0000 Subject: Repeat key presses when the key is held down - thanks to Mad_Mac for this one :-) Subversion-branch: /trunk/chocolate-doom Subversion-revision: 613 --- src/i_video.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/i_video.c b/src/i_video.c index c2e33058..ea99cfb7 100644 --- a/src/i_video.c +++ b/src/i_video.c @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: i_video.c 598 2006-09-09 15:49:39Z fraggle $ +// $Id: i_video.c 613 2006-09-18 12:13:40Z fraggle $ // // Copyright(C) 1993-1996 Id Software, Inc. // Copyright(C) 2005 Simon Howard @@ -175,7 +175,7 @@ //----------------------------------------------------------------------------- static const char -rcsid[] = "$Id: i_video.c 598 2006-09-09 15:49:39Z fraggle $"; +rcsid[] = "$Id: i_video.c 613 2006-09-18 12:13:40Z fraggle $"; #include #include @@ -1263,6 +1263,12 @@ void I_InitGraphics(void) SDL_EnableUNICODE(1); + // Repeat key presses - this is what Vanilla Doom does + // Not sure about repeat rate - probably dependent on which DOS + // driver is used. This is good enough though. + + SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); + // clear out any events waiting at the start while (SDL_PollEvent(&dummy)); -- cgit v1.2.3