Fixed error in last commit
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1319 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
8bbf7dfc46
commit
63867b654c
@ -223,7 +223,8 @@ void WindowImpl::ProcessJoystickEvents()
|
|||||||
// Axis
|
// Axis
|
||||||
for (unsigned int j = 0; j < Joy::Count; ++j)
|
for (unsigned int j = 0; j < Joy::Count; ++j)
|
||||||
{
|
{
|
||||||
if (myJoysticks[i].HasAxis(static_cast<Joy::Axis>(i)))
|
Joy::Axis Axis = static_cast<Joy::Axis>(j);
|
||||||
|
if (myJoysticks[i].HasAxis(Axis))
|
||||||
{
|
{
|
||||||
float PrevPos = PreviousState.Axis[j];
|
float PrevPos = PreviousState.Axis[j];
|
||||||
float CurrPos = myJoyStates[i].Axis[j];
|
float CurrPos = myJoyStates[i].Axis[j];
|
||||||
@ -232,7 +233,7 @@ void WindowImpl::ProcessJoystickEvents()
|
|||||||
Event Event;
|
Event Event;
|
||||||
Event.Type = Event::JoyMoved;
|
Event.Type = Event::JoyMoved;
|
||||||
Event.JoyMove.JoystickId = i;
|
Event.JoyMove.JoystickId = i;
|
||||||
Event.JoyMove.Axis = static_cast<Joy::Axis>(j);
|
Event.JoyMove.Axis = Axis;
|
||||||
Event.JoyMove.Position = CurrPos;
|
Event.JoyMove.Position = CurrPos;
|
||||||
SendEvent(Event);
|
SendEvent(Event);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user