[Orxonox-commit 739] r3269 - branches/core4/src/core/input

rgrieder at orxonox.net rgrieder at orxonox.net
Wed Jul 1 21:24:57 CEST 2009


Author: rgrieder
Date: 2009-07-01 21:24:57 +0200 (Wed, 01 Jul 2009)
New Revision: 3269

Modified:
   branches/core4/src/core/input/KeyBinder.cc
Log:
Bugfix for InputManager reloading.

Modified: branches/core4/src/core/input/KeyBinder.cc
===================================================================
--- branches/core4/src/core/input/KeyBinder.cc	2009-07-01 16:20:38 UTC (rev 3268)
+++ branches/core4/src/core/input/KeyBinder.cc	2009-07-01 19:24:57 UTC (rev 3269)
@@ -95,8 +95,8 @@
             mouseAxes_[i].groupName_ = "MouseAxes";
         }
 
-        // Get a new ConfigFileType from the ConfigFileManager
-        this->configFile_ = ConfigFileManager::getInstance().getNewConfigFileType();
+        // We might not even load any bindings at all (KeyDetector for instance)
+        this->configFile_ = ConfigFileType::NoType;
 
         // initialise joy sticks separatly to allow for reloading
         numberOfJoySticks_ = InputManager::getInstance().numberOfJoySticks();
@@ -249,6 +249,12 @@
         if (filename.empty())
             return;
 
+        if (this->configFile_ == ConfigFileType::NoType)
+        {
+            // Get a new ConfigFileType from the ConfigFileManager
+            this->configFile_ = ConfigFileManager::getInstance().getNewConfigFileType();
+        }
+
         ConfigFileManager::getInstance().setFilename(this->configFile_, filename);
 
         // Parse bindings and create the ConfigValueContainers if necessary




More information about the Orxonox-commit mailing list