mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +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
|
// Get the Index-th connected joystick
|
||||||
MMRESULT Error;
|
MMRESULT Error;
|
||||||
JOYINFOEX JoyInfo;
|
JOYINFOEX JoyInfo;
|
||||||
|
JoyInfo.dwSize = sizeof(JoyInfo);
|
||||||
|
JoyInfo.dwFlags = JOY_RETURNALL;
|
||||||
for (unsigned int NbFound = 0; (Error = joyGetPosEx(myIndex, &JoyInfo)) != JOYERR_PARMS; myIndex++)
|
for (unsigned int NbFound = 0; (Error = joyGetPosEx(myIndex, &JoyInfo)) != JOYERR_PARMS; myIndex++)
|
||||||
{
|
{
|
||||||
// Check if the current joystick is connected
|
// Check if the current joystick is connected
|
||||||
|
Loading…
Reference in New Issue
Block a user