This file is part of mingw-cross-env. See doc/index.html for further information. This patch has been taken from: http://hg.libsdl.org/SDL/rev/daf9e6037596 diff --git a/src/video/windx5/SDL_dx5events.c b/src/video/windx5/SDL_dx5events.c --- a/src/video/windx5/SDL_dx5events.c +++ b/src/video/windx5/SDL_dx5events.c @@ -559,13 +559,15 @@ active = (wParam && (GetForegroundWindow() == hwnd)); if ( active ) { - for ( i=0; SDL_DIdev[i]; ++i ) { - IDirectInputDevice2_Acquire( + for ( i=0; i