Changeset 2690 for code/branches/buildsystem3/src/core/input
- Timestamp:
- Feb 23, 2009, 8:57:42 PM (16 years ago)
- Location:
- code/branches/buildsystem3/src/core/input
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/buildsystem3/src/core/input/KeyBinder.cc
r2687 r2690 248 248 True if loading succeeded. 249 249 */ 250 void KeyBinder::loadBindings(const std::string& filename , const std::string& defaultFilename)250 void KeyBinder::loadBindings(const std::string& filename) 251 251 { 252 252 COUT(3) << "KeyBinder: Loading key bindings..." << std::endl; … … 255 255 return; 256 256 257 boost::filesystem::path folder(Core::getConfigPath());258 boost::filesystem::path filepath(folder/filename);259 260 // get bindings from default file if filename doesn't exist.261 std::ifstream infile;262 infile.open(filepath.file_string().c_str());263 if (!infile)264 {265 ConfigFileManager::getInstance().setFilename(this->configFile_, defaultFilename);266 ConfigFileManager::getInstance().saveAs(this->configFile_, filename);267 }268 else269 infile.close();270 257 ConfigFileManager::getInstance().setFilename(this->configFile_, filename); 271 258 -
code/branches/buildsystem3/src/core/input/KeyBinder.h
r2662 r2690 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.