Changeset 2710 for code/trunk/src/core/input
- Timestamp:
- Feb 28, 2009, 7:46:37 PM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:ignore deleted
- Property svn:mergeinfo changed
-
code/trunk/src/core/input/CMakeLists.txt
r2131 r2710 1 SET(SRC_FILES1 ADD_SOURCE_FILES(CORE_SRC_FILES 2 2 Button.cc 3 3 CalibratorCallback.cc … … 12 12 SimpleInputState.cc 13 13 ) 14 15 ADD_SOURCE_FILES(SRC_FILES) -
code/trunk/src/core/input/KeyBinder.cc
r2662 r2710 36 36 #include <fstream> 37 37 #include <string> 38 #include <boost/filesystem.hpp> 38 39 39 40 #include "util/Convert.h" … … 42 43 #include "core/CoreIncludes.h" 43 44 #include "core/ConfigFileManager.h" 45 #include "core/Core.h" 44 46 #include "InputCommands.h" 45 47 #include "InputManager.h" … … 246 248 True if loading succeeded. 247 249 */ 248 void KeyBinder::loadBindings(const std::string& filename , const std::string& defaultFilename)250 void KeyBinder::loadBindings(const std::string& filename) 249 251 { 250 252 COUT(3) << "KeyBinder: Loading key bindings..." << std::endl; … … 253 255 return; 254 256 255 // get bindings from default file if filename doesn't exist.256 std::ifstream infile;257 infile.open(filename.c_str());258 if (!infile)259 {260 ConfigFileManager::getInstance().setFilename(this->configFile_, defaultFilename);261 ConfigFileManager::getInstance().saveAs(this->configFile_, filename);262 }263 else264 infile.close();265 257 ConfigFileManager::getInstance().setFilename(this->configFile_, filename); 266 258 -
code/trunk/src/core/input/KeyBinder.h
r2662 r2710 61 61 virtual ~KeyBinder(); 62 62 63 void loadBindings(const std::string& filename , const std::string& defaultFilename);63 void loadBindings(const std::string& filename); 64 64 void clearBindings(); 65 65 bool setBinding(const std::string& binding, const std::string& name, bool bTemporary = false);
Note: See TracChangeset
for help on using the changeset viewer.