From cb0f429167d89cc5d47afcb2ca8565ad51c23501 Mon Sep 17 00:00:00 2001 From: laurentgom Date: Wed, 13 May 2009 18:12:33 +0000 Subject: [PATCH] FS#111 - Fixed joysticks sometimes not working at all on Vista git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1090 4e206d99-4929-0410-ac5d-dfc041789085 --- src/SFML/Window/Win32/Joystick.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/SFML/Window/Win32/Joystick.cpp b/src/SFML/Window/Win32/Joystick.cpp index 5dcaecdd8..10bb0d677 100644 --- a/src/SFML/Window/Win32/Joystick.cpp +++ b/src/SFML/Window/Win32/Joystick.cpp @@ -49,6 +49,8 @@ void Joystick::Initialize(unsigned int Index) // Get the Index-th connected joystick MMRESULT Error; JOYINFOEX JoyInfo; + JoyInfo.dwSize = sizeof(JoyInfo); + JoyInfo.dwFlags = JOY_RETURNALL; for (unsigned int NbFound = 0; (Error = joyGetPosEx(myIndex, &JoyInfo)) != JOYERR_PARMS; myIndex++) { // Check if the current joystick is connected