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