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
This commit is contained in:
laurentgom 2009-05-13 18:12:33 +00:00
parent 5240c80229
commit cb0f429167

View File

@ -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