mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
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:
parent
5240c80229
commit
cb0f429167
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user