Index: /code/branches/gamestates2/src/libraries/core/input/InputDevice.h
===================================================================
--- /code/branches/gamestates2/src/libraries/core/input/InputDevice.h	(revision 6744)
+++ /code/branches/gamestates2/src/libraries/core/input/InputDevice.h	(revision 6745)
@@ -159,5 +159,5 @@
             for (unsigned int iB = 0; iB < pressedButtons_.size(); ++iB)
                 for (unsigned int iS = 0; iS < inputStates_.size(); ++iS)
-                    inputStates_[iS]->buttonEvent<ButtonEvent::THold, Traits::ButtonTypeParam>(
+                    inputStates_[iS]->buttonEvent<ButtonEvent::THold, typename Traits::ButtonTypeParam>(
                         this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(pressedButtons_[iB]));
 
@@ -196,5 +196,5 @@
             // Call states
             for (unsigned int i = 0; i < inputStates_.size(); ++i)
-                inputStates_[i]->buttonEvent<ButtonEvent::TPress, Traits::ButtonTypeParam>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button));
+                inputStates_[i]->buttonEvent<ButtonEvent::TPress, typename Traits::ButtonTypeParam>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button));
         }
 
@@ -218,5 +218,5 @@
             // Call states
             for (unsigned int i = 0; i < inputStates_.size(); ++i)
-                inputStates_[i]->buttonEvent<ButtonEvent::TRelease, Traits::ButtonTypeParam>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button));
+                inputStates_[i]->buttonEvent<ButtonEvent::TRelease, typename Traits::ButtonTypeParam>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button));
         }
 
Index: /code/branches/gamestates2/src/libraries/core/input/InputHandler.h
===================================================================
--- /code/branches/gamestates2/src/libraries/core/input/InputHandler.h	(revision 6744)
+++ /code/branches/gamestates2/src/libraries/core/input/InputHandler.h	(revision 6745)
@@ -118,10 +118,4 @@
         template<class T> void buttonEvent(unsigned int device, T button, ButtonEvent::THold)
             { this->buttonHeld(button); }
-        template<> void buttonEvent<JoyStickButtonCode::ByEnum>(unsigned int device, JoyStickButtonCode::ByEnum button, ButtonEvent::TPress)
-            { this->buttonPressed(device - InputDeviceEnumerator::FirstJoyStick, button); }
-        template<> void buttonEvent<JoyStickButtonCode::ByEnum>(unsigned int device, JoyStickButtonCode::ByEnum button, ButtonEvent::TRelease)
-            { this->buttonReleased(device - InputDeviceEnumerator::FirstJoyStick, button); }
-        template<> void buttonEvent<JoyStickButtonCode::ByEnum>(unsigned int device, JoyStickButtonCode::ByEnum button, ButtonEvent::THold)
-            { this->buttonHeld(device - InputDeviceEnumerator::FirstJoyStick, button); }
 
         virtual void buttonPressed (const KeyEvent& evt) { }
@@ -149,4 +143,11 @@
         static InputHandler EMPTY;
     };
+
+    template<> inline void InputHandler::buttonEvent<JoyStickButtonCode::ByEnum>(unsigned int device, JoyStickButtonCode::ByEnum button, ButtonEvent::TPress)
+        { this->buttonPressed(device - InputDeviceEnumerator::FirstJoyStick, button); }
+    template<> inline void InputHandler::buttonEvent<JoyStickButtonCode::ByEnum>(unsigned int device, JoyStickButtonCode::ByEnum button, ButtonEvent::TRelease)
+        { this->buttonReleased(device - InputDeviceEnumerator::FirstJoyStick, button); }
+    template<> inline void InputHandler::buttonEvent<JoyStickButtonCode::ByEnum>(unsigned int device, JoyStickButtonCode::ByEnum button, ButtonEvent::THold)
+        { this->buttonHeld(device - InputDeviceEnumerator::FirstJoyStick, button); }
 }
 
Index: /code/branches/gamestates2/src/libraries/core/input/InputState.h
===================================================================
--- /code/branches/gamestates2/src/libraries/core/input/InputState.h	(revision 6744)
+++ /code/branches/gamestates2/src/libraries/core/input/InputState.h	(revision 6745)
@@ -205,5 +205,5 @@
 
     template <typename EventType, class ButtonTypeParam>
-    FORCEINLINE void InputState::buttonEvent(unsigned int device, typename ButtonTypeParam button)
+    FORCEINLINE void InputState::buttonEvent(unsigned int device, ButtonTypeParam button)
     {
         assert(device < handlers_.size());
