From 2fc59f0ef5696f7487c1f26d81c263f720991cf8 Mon Sep 17 00:00:00 2001 From: havoc Date: Wed, 1 Jun 2005 08:38:30 +0000 Subject: [PATCH] enable unicode and keyrepeat every time a video mode is initialized, this seems to fix the bug where typing stops working after a vid_restart git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5373 d7cf8633-e32d-0410-b094-e92efae38249 --- vid_sdl.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/vid_sdl.c b/vid_sdl.c index 241255a0..0474a26c 100644 --- a/vid_sdl.c +++ b/vid_sdl.c @@ -307,12 +307,6 @@ void VID_Init (void) if (SDL_Init(SDL_INIT_VIDEO) < 0) Sys_Error ("Failed to init video: %s\n", SDL_GetError()); vid_isfullscreen = false; - - SDL_SetEventFilter( (SDL_EventFilter) Sys_EventFilter ); - // init keyboard - SDL_EnableUNICODE( SDL_ENABLE ); - // enable key repeat since everyone expects it - SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); } // set the icon (we dont use SDL here since it would be too much a PITA) @@ -424,7 +418,15 @@ int VID_InitMode(int fullscreen, int width, int height, int bpp) VID_Shutdown(); return false; } + + // set window title VID_SetCaption(); + // set up an event filter to ask confirmation on close button in WIN32 + SDL_SetEventFilter( (SDL_EventFilter) Sys_EventFilter ); + // init keyboard + SDL_EnableUNICODE( SDL_ENABLE ); + // enable key repeat since everyone expects it + SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); gl_renderer = qglGetString(GL_RENDERER); gl_vendor = qglGetString(GL_VENDOR); -- 2.39.2