From fbad51412396405ca93a660f4695a0541c42d14e Mon Sep 17 00:00:00 2001 From: William McBrine Date: Mon, 18 Jun 2007 09:36:44 +0000 Subject: [PATCH] My second attempt to kill the bogus autorepeats -- seems to work, although I do still get a missed key sometimes on return from the shell. --- sdl1/pdcscrn.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sdl1/pdcscrn.c b/sdl1/pdcscrn.c index ff6e8a3f..30016f15 100644 --- a/sdl1/pdcscrn.c +++ b/sdl1/pdcscrn.c @@ -13,7 +13,7 @@ #include "pdcsdl.h" -RCSID("$Id: pdcscrn.c,v 1.16 2007/06/18 00:50:10 wmcbrine Exp $") +RCSID("$Id: pdcscrn.c,v 1.17 2007/06/18 09:36:44 wmcbrine Exp $") #include "deffont.h" #include "deficon.h" @@ -135,8 +135,6 @@ int PDC_scr_open(int argc, char **argv) pdc_mapped[i] = SDL_MapRGB(pdc_screen->format, pdc_color[i].r, pdc_color[i].g, pdc_color[i].b); - SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, - SDL_DEFAULT_REPEAT_INTERVAL); SDL_EnableUNICODE(1); PDC_mouse_set(); @@ -150,6 +148,8 @@ int PDC_scr_open(int argc, char **argv) SP->mouse_wait = PDC_CLICK_PERIOD; SP->audible = FALSE; + PDC_reset_prog_mode(); + SP->mono = FALSE; return OK; @@ -184,12 +184,15 @@ void PDC_reset_prog_mode(void) PDC_LOG(("PDC_reset_prog_mode() - called.\n")); PDC_flushinp(); + SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, + SDL_DEFAULT_REPEAT_INTERVAL); } void PDC_reset_shell_mode(void) { PDC_LOG(("PDC_reset_shell_mode() - called.\n")); + SDL_EnableKeyRepeat(0, 0); PDC_flushinp(); }