From a87b059ab7f8917a72a88b865059deefde206ab9 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Fri, 5 Aug 2011 19:47:33 +0000 Subject: [PATCH] Don't grab mouse till UI loads. --- code/sdl/sdl_input.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/code/sdl/sdl_input.c b/code/sdl/sdl_input.c index 6d85945a..dad9169a 100644 --- a/code/sdl/sdl_input.c +++ b/code/sdl/sdl_input.c @@ -1050,16 +1050,8 @@ void IN_Init( void ) SDL_EnableKeyRepeat( SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL ); keyRepeatEnabled = qtrue; - if( in_mouse->value ) - { - mouseAvailable = qtrue; - IN_ActivateMouse( ); - } - else - { - IN_DeactivateMouse( ); - mouseAvailable = qfalse; - } + mouseAvailable = ( in_mouse->value != 0 ); + IN_DeactivateMouse( ); appState = SDL_GetAppState( ); Cvar_SetValue( "com_unfocused", !( appState & SDL_APPINPUTFOCUS ) );