Mercurial > mxe-octave
comparison src/sdl-2-fix-dinput.patch @ 950:2e58d1df6906
include a bugfix for package sdl (by Gregory Smith)
author | Volker Grabsch <vog@notjusthosting.com> |
---|---|
date | Wed, 12 May 2010 15:09:00 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
949:3dcb4ece2c80 | 950:2e58d1df6906 |
---|---|
1 This file is part of mingw-cross-env. | |
2 See doc/index.html for further information. | |
3 | |
4 This patch has been taken from: | |
5 http://hg.libsdl.org/SDL/rev/daf9e6037596 | |
6 | |
7 diff --git a/src/video/windx5/SDL_dx5events.c b/src/video/windx5/SDL_dx5events.c | |
8 --- a/src/video/windx5/SDL_dx5events.c | |
9 +++ b/src/video/windx5/SDL_dx5events.c | |
10 @@ -559,13 +559,15 @@ | |
11 | |
12 active = (wParam && (GetForegroundWindow() == hwnd)); | |
13 if ( active ) { | |
14 - for ( i=0; SDL_DIdev[i]; ++i ) { | |
15 - IDirectInputDevice2_Acquire( | |
16 + for ( i=0; i<MAX_INPUTS; ++i ) { | |
17 + if (SDL_DIdev[i] != NULL) | |
18 + IDirectInputDevice2_Acquire( | |
19 SDL_DIdev[i]); | |
20 } | |
21 } else { | |
22 - for ( i=0; SDL_DIdev[i]; ++i ) { | |
23 - IDirectInputDevice2_Unacquire( | |
24 + for ( i=0; i<MAX_INPUTS; ++i ) { | |
25 + if (SDL_DIdev[i] != NULL) | |
26 + IDirectInputDevice2_Unacquire( | |
27 SDL_DIdev[i]); | |
28 } | |
29 mouse_lost = 1; | |
30 |