From 63867b654c31cbe16a0becbcaef86791d3337edc Mon Sep 17 00:00:00 2001 From: LaurentGom Date: Tue, 5 Jan 2010 16:50:21 +0000 Subject: [PATCH] Fixed error in last commit git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1319 4e206d99-4929-0410-ac5d-dfc041789085 --- src/SFML/Window/WindowImpl.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/SFML/Window/WindowImpl.cpp b/src/SFML/Window/WindowImpl.cpp index 782f8e3e..7337fcab 100644 --- a/src/SFML/Window/WindowImpl.cpp +++ b/src/SFML/Window/WindowImpl.cpp @@ -223,7 +223,8 @@ void WindowImpl::ProcessJoystickEvents() // Axis for (unsigned int j = 0; j < Joy::Count; ++j) { - if (myJoysticks[i].HasAxis(static_cast(i))) + Joy::Axis Axis = static_cast(j); + if (myJoysticks[i].HasAxis(Axis)) { float PrevPos = PreviousState.Axis[j]; float CurrPos = myJoyStates[i].Axis[j]; @@ -232,7 +233,7 @@ void WindowImpl::ProcessJoystickEvents() Event Event; Event.Type = Event::JoyMoved; Event.JoyMove.JoystickId = i; - Event.JoyMove.Axis = static_cast(j); + Event.JoyMove.Axis = Axis; Event.JoyMove.Position = CurrPos; SendEvent(Event); }