Index: /code/branches/core4/src/core/input/InputManager.cc
===================================================================
--- /code/branches/core4/src/core/input/InputManager.cc	(revision 3287)
+++ /code/branches/core4/src/core/input/InputManager.cc	(revision 3288)
@@ -260,6 +260,8 @@
 
         // inform all JoyStick Device Number Listeners
-        for (ObjectList<JoyStickQuantityListener>::iterator it = ObjectList<JoyStickQuantityListener>::begin(); it; ++it)
-            it->JoyStickQuantityChanged(devices_.size() - InputDeviceEnumerator::FirstJoyStick);
+        std::vector<JoyStick*> joyStickList;
+        for (unsigned int i = InputDeviceEnumerator::FirstJoyStick; i < devices_.size(); ++i)
+            joyStickList.push_back(static_cast<JoyStick*>(devices_[i]));
+        JoyStickQuantityListener::changeJoyStickQuantity(joyStickList);
     }
 
@@ -572,5 +574,4 @@
         if (statesByName_.find(name) == statesByName_.end())
         {
-            InputState* state = new InputState;
             if (priority >= InputStatePriority::HighPriority || priority == InputStatePriority::Empty)
             {
@@ -583,15 +584,10 @@
                         COUT(2) << "Warning: Could not add an InputState with the same priority '"
                             << static_cast<int>(priority) << "' != 0." << std::endl;
-                        return false;
+                        return 0;
                     }
                 }
             }
+            InputState* state = new InputState(name, bAlwaysGetsInput, bTransparent, priority);
             statesByName_[name] = state;
-            state->JoyStickQuantityChanged(devices_.size() - InputDeviceEnumerator::FirstJoyStick);
-            state->setName(name);
-            state->bAlwaysGetsInput_ = bAlwaysGetsInput;
-            state->bTransparent_ = bTransparent;
-            if (priority >= InputStatePriority::HighPriority || priority == InputStatePriority::Empty)
-                state->setPriority(priority);
 
             return state;
Index: /code/branches/core4/src/core/input/InputState.cc
===================================================================
--- /code/branches/core4/src/core/input/InputState.cc	(revision 3287)
+++ /code/branches/core4/src/core/input/InputState.cc	(revision 3288)
@@ -32,8 +32,8 @@
 namespace orxonox
 {
-    InputState::InputState()
-        : priority_(0)
-        , bAlwaysGetsInput_(false)
-        , bTransparent_(false)
+    InputState::InputState(const std::string& name, bool bAlwaysGetsInput, bool bTransparent, InputStatePriority priority)
+        : name_(name)
+        , bAlwaysGetsInput_(bAlwaysGetsInput)
+        , bTransparent_(bTransparent)
         , bExpired_(true)
         , handlers_(2)
@@ -42,4 +42,10 @@
         , leaveFunctor_(0)
     {
+        if (priority >= InputStatePriority::HighPriority || priority == InputStatePriority::Empty)
+            priority_ = priority;
+        else
+            priority_ = 0;
+
+        handlers_.resize(InputDeviceEnumerator::FirstJoyStick + JoyStickQuantityListener::getJoyStickList().size(), NULL);
     }
 
@@ -52,8 +58,8 @@
     }
 
-    void InputState::JoyStickQuantityChanged(unsigned int n)
+    void InputState::JoyStickQuantityChanged(const std::vector<JoyStick*>& joyStickList)
     {
         unsigned int oldSize = handlers_.size();
-        handlers_.resize(InputDeviceEnumerator::FirstJoyStick + n, NULL);
+        handlers_.resize(InputDeviceEnumerator::FirstJoyStick + joyStickList.size(), NULL);
 
         for (unsigned int i = oldSize; i < handlers_.size(); ++i)
Index: /code/branches/core4/src/core/input/InputState.h
===================================================================
--- /code/branches/core4/src/core/input/InputState.h	(revision 3287)
+++ /code/branches/core4/src/core/input/InputState.h	(revision 3288)
@@ -97,16 +97,15 @@
 
     private:
-        InputState();
+        InputState(const std::string& name, bool bAlwaysGetsInput, bool bTransparent, InputStatePriority priority);
         ~InputState() { }
 
-        void JoyStickQuantityChanged(unsigned int n);
+        void JoyStickQuantityChanged(const std::vector<JoyStick*>& joyStickList);
 
-        void setName(const std::string& name) { name_ = name; }
-        void setPriority(int priority)        { priority_ = priority; }
+        void setPriority(int priority) { priority_ = priority; }
 
-        std::string                 name_;
+        const std::string           name_;
+        const bool                  bAlwaysGetsInput_;
+        const bool                  bTransparent_;
         int                         priority_;
-        bool                        bAlwaysGetsInput_;
-        bool                        bTransparent_;
         bool                        bExpired_;
         std::vector<InputHandler*>  handlers_;
Index: /code/branches/core4/src/core/input/JoyStickQuantityListener.cc
===================================================================
--- /code/branches/core4/src/core/input/JoyStickQuantityListener.cc	(revision 3287)
+++ /code/branches/core4/src/core/input/JoyStickQuantityListener.cc	(revision 3288)
@@ -28,11 +28,23 @@
 
 #include "JoyStickQuantityListener.h"
+
 #include "core/CoreIncludes.h"
+#include "core/ObjectList.h"
 
 namespace orxonox
 {
+    std::vector<JoyStick*> JoyStickQuantityListener::joyStickList_s;
+
     JoyStickQuantityListener::JoyStickQuantityListener()
     {
         RegisterObject(JoyStickQuantityListener);
     }
+
+    //! Calls all registered objects and sets the static variable
+    /*static*/ void JoyStickQuantityListener::changeJoyStickQuantity(const std::vector<JoyStick*>& joyStickList)
+    {
+        joyStickList_s = joyStickList;
+        for (ObjectList<JoyStickQuantityListener>::iterator it = ObjectList<JoyStickQuantityListener>::begin(); it; ++it)
+            it->JoyStickQuantityChanged(joyStickList);
+    }
 }
Index: /code/branches/core4/src/core/input/JoyStickQuantityListener.h
===================================================================
--- /code/branches/core4/src/core/input/JoyStickQuantityListener.h	(revision 3287)
+++ /code/branches/core4/src/core/input/JoyStickQuantityListener.h	(revision 3288)
@@ -43,10 +43,20 @@
     class _CoreExport JoyStickQuantityListener : virtual public OrxonoxClass
     {
+        friend InputManager;
     public:
         JoyStickQuantityListener();
         virtual ~JoyStickQuantityListener() { }
 
-        //! Called when joy sticks get added/removed
-        virtual void JoyStickQuantityChanged(unsigned int value) = 0;
+        //! Returns a list with all JoySticks currently loaded
+        const std::vector<JoyStick*>& getJoyStickList() const { return joyStickList_s; }
+
+    private:
+        //! Called whenever joy sticks get added/removed
+        virtual void JoyStickQuantityChanged(const std::vector<JoyStick*>& joyStickList) = 0;
+
+        static void changeJoyStickQuantity(const std::vector<JoyStick*>& joyStickList);
+
+        //! Static variable that holds the latest distributed information
+        static std::vector<JoyStick*> joyStickList_s;
     };
 }
Index: /code/branches/core4/src/core/input/KeyBinder.cc
===================================================================
--- /code/branches/core4/src/core/input/KeyBinder.cc	(revision 3287)
+++ /code/branches/core4/src/core/input/KeyBinder.cc	(revision 3288)
@@ -40,5 +40,4 @@
 #include "core/ConfigFileManager.h"
 #include "InputCommands.h"
-#include "InputManager.h"
 
 namespace orxonox
@@ -103,5 +102,5 @@
 
         // initialise joy sticks separatly to allow for reloading
-        numberOfJoySticks_ = InputManager::getInstance().getJoyStickQuantity();
+        numberOfJoySticks_ = this->getJoyStickList().size();
         initialiseJoyStickBindings();
 
@@ -155,8 +154,8 @@
     }
 
-    void KeyBinder::JoyStickQuantityChanged(unsigned int value)
+    void KeyBinder::JoyStickQuantityChanged(const std::vector<JoyStick*>& joyStickList)
     {
         unsigned int oldValue = numberOfJoySticks_;
-        numberOfJoySticks_ = value;
+        numberOfJoySticks_ = joyStickList.size();
 
         // initialise joy stick bindings
Index: /code/branches/core4/src/core/input/KeyBinder.h
===================================================================
--- /code/branches/core4/src/core/input/KeyBinder.h	(revision 3287)
+++ /code/branches/core4/src/core/input/KeyBinder.h	(revision 3288)
@@ -76,5 +76,5 @@
         void buttonThresholdChanged();
         // from JoyStickQuantityListener interface
-        virtual void JoyStickQuantityChanged(unsigned int value);
+        virtual void JoyStickQuantityChanged(const std::vector<JoyStick*>& joyStickList);
         void initialiseJoyStickBindings();
         void compilePointerLists();
Index: /code/branches/core4/src/core/input/KeyDetector.cc
===================================================================
--- /code/branches/core4/src/core/input/KeyDetector.cc	(revision 3287)
+++ /code/branches/core4/src/core/input/KeyDetector.cc	(revision 3288)
@@ -73,7 +73,7 @@
     }
 
-    void KeyDetector::JoyStickQuantityChanged(unsigned int value)
+    void KeyDetector::JoyStickQuantityChanged(const std::vector<JoyStick*>& joyStickList)
     {
-        KeyBinder::JoyStickQuantityChanged(value);
+        KeyBinder::JoyStickQuantityChanged(joyStickList);
         setCallbackCommand(callbackCommand_);
     }
Index: /code/branches/core4/src/core/input/KeyDetector.h
===================================================================
--- /code/branches/core4/src/core/input/KeyDetector.h	(revision 3287)
+++ /code/branches/core4/src/core/input/KeyDetector.h	(revision 3288)
@@ -49,5 +49,5 @@
         ~KeyDetector();
         void setCallbackCommand(const std::string& command);
-        void JoyStickQuantityChanged(unsigned int value);
+        void JoyStickQuantityChanged(const std::vector<JoyStick*>& joyStickList);
 
     private:
