# HG changeset patch # User Sam Lantinga # Date 1253689032 0 # Node ID 0adda8ff43ef8a6e09b86e12c0c504e33b3f888e # Parent 1fc8c8a5ff00795bc52d04dc28fdaa542078f2d5 Potentially fixed bug #774 There's a mismatch between ndev and MAX_INPUTS diff -r 1fc8c8a5ff00 -r 0adda8ff43ef src/video/windx5/SDL_dx5events.c --- a/src/video/windx5/SDL_dx5events.c Wed Sep 23 06:56:28 2009 +0000 +++ b/src/video/windx5/SDL_dx5events.c Wed Sep 23 06:57:12 2009 +0000 @@ -43,7 +43,7 @@ #endif /* The keyboard and mouse device input */ -#define MAX_INPUTS 16 /* Maximum of 16-1 input devices */ +#define MAX_INPUTS 2 #define INPUT_QSIZE 512 /* Buffer up to 512 input messages */ static LPDIRECTINPUT dinput = NULL; @@ -264,6 +264,8 @@ SDL_DIdev[i] = NULL; } } + SDL_DIndev = 0; + /* Release DirectInput */ IDirectInput_Release(dinput); dinput = NULL; @@ -664,15 +666,17 @@ /* Pump the DirectInput flow */ if ( SDL_GetAppState() & SDL_APPINPUTFOCUS ) { - for ( i=0; i