summaryrefslogtreecommitdiffstats
path: root/src/sdl-2-fix-dinput.patch
diff options
context:
space:
mode:
authorVolker Grabsch <vog@notjusthosting.com>2010-05-12 13:09:00 (GMT)
committerVolker Grabsch <vog@notjusthosting.com>2010-05-12 13:09:00 (GMT)
commite88c227f3062f861de12dfb6902d93afba990396 (patch)
tree46a204f5d83ecaccbb97db2add4abe4737241a47 /src/sdl-2-fix-dinput.patch
parent1f41f9c88d11228032b8de77cee09aeee9670d45 (diff)
downloadmxe-e88c227f3062f861de12dfb6902d93afba990396.zip
mxe-e88c227f3062f861de12dfb6902d93afba990396.tar.gz
mxe-e88c227f3062f861de12dfb6902d93afba990396.tar.bz2
include a bugfix for package sdl (by Gregory Smith)
Diffstat (limited to 'src/sdl-2-fix-dinput.patch')
-rw-r--r--src/sdl-2-fix-dinput.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/sdl-2-fix-dinput.patch b/src/sdl-2-fix-dinput.patch
new file mode 100644
index 0000000..7eeb335
--- /dev/null
+++ b/src/sdl-2-fix-dinput.patch
@@ -0,0 +1,30 @@
+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<MAX_INPUTS; ++i ) {
++ if (SDL_DIdev[i] != NULL)
++ IDirectInputDevice2_Acquire(
+ SDL_DIdev[i]);
+ }
+ } else {
+- for ( i=0; SDL_DIdev[i]; ++i ) {
+- IDirectInputDevice2_Unacquire(
++ for ( i=0; i<MAX_INPUTS; ++i ) {
++ if (SDL_DIdev[i] != NULL)
++ IDirectInputDevice2_Unacquire(
+ SDL_DIdev[i]);
+ }
+ mouse_lost = 1;
+