Changeset 8058 for code/branches/kicklib
- Timestamp:
- Mar 11, 2011, 3:33:35 AM (14 years ago)
- Location:
- code/branches/kicklib/src/libraries/core
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/kicklib/src/libraries/core/Game.cc
r7284 r8058 455 455 ThrowException(GameState, "Emtpy GameState hierarchy provided, terminating."); 456 456 // Add element with large identation to detect the last with just an iterator 457 stateStrings.push_back(std::make_pair( "", -1));457 stateStrings.push_back(std::make_pair(std::string(), -1)); 458 458 459 459 // Parse elements recursively -
code/branches/kicklib/src/libraries/core/PathConfig.cc
r6417 r8058 233 233 // Create directories to avoid problems when opening files in non existent folders. 234 234 std::vector<std::pair<bf::path, std::string> > directories; 235 directories.push_back(std::make_pair(bf::path(configPath_), "config"));236 directories.push_back(std::make_pair(bf::path(logPath_), "log"));235 directories.push_back(std::make_pair(bf::path(configPath_), std::string("config"))); 236 directories.push_back(std::make_pair(bf::path(logPath_), std::string("log"))); 237 237 238 238 for (std::vector<std::pair<bf::path, std::string> >::iterator it = directories.begin(); -
code/branches/kicklib/src/libraries/core/input/InputManager.cc
r7874 r8058 151 151 assert(devices_.size() == InputDeviceEnumerator::FirstJoyStick); 152 152 153 typedef std::pair<std::string, std::string> StringPair; 154 153 155 // Fill parameter list 154 156 OIS::ParamList paramList; 155 157 size_t windowHnd = GraphicsManager::getInstance().getRenderWindowHandle(); 156 paramList.insert( std::make_pair("WINDOW", multi_cast<std::string>(windowHnd)));158 paramList.insert(StringPair("WINDOW", multi_cast<std::string>(windowHnd))); 157 159 #if defined(ORXONOX_PLATFORM_WINDOWS) 158 paramList.insert( std::make_pair("w32_keyboard", "DISCL_NONEXCLUSIVE"));159 paramList.insert( std::make_pair("w32_keyboard", "DISCL_FOREGROUND"));160 paramList.insert( std::make_pair("w32_mouse", "DISCL_FOREGROUND"));160 paramList.insert(StringPair("w32_keyboard", "DISCL_NONEXCLUSIVE")); 161 paramList.insert(StringPair("w32_keyboard", "DISCL_FOREGROUND")); 162 paramList.insert(StringPair("w32_mouse", "DISCL_FOREGROUND")); 161 163 if (exclusiveMouse_ == TriBool::True || GraphicsManager::getInstance().isFullScreen()) 162 164 { 163 165 // Disable Windows key plus special keys (like play, stop, next, etc.) 164 paramList.insert( std::make_pair("w32_keyboard", "DISCL_NOWINKEY"));165 paramList.insert( std::make_pair("w32_mouse", "DISCL_EXCLUSIVE"));166 } 167 else 168 paramList.insert( std::make_pair("w32_mouse", "DISCL_NONEXCLUSIVE"));166 paramList.insert(StringPair("w32_keyboard", "DISCL_NOWINKEY")); 167 paramList.insert(StringPair("w32_mouse", "DISCL_EXCLUSIVE")); 168 } 169 else 170 paramList.insert(StringPair("w32_mouse", "DISCL_NONEXCLUSIVE")); 169 171 #elif defined(ORXONOX_PLATFORM_LINUX) 170 172 // Enabling this is probably a bad idea, but whenever orxonox crashes, the setting stays on 171 173 // Trouble might be that the Pressed event occurs a bit too often... 172 paramList.insert( std::make_pair("XAutoRepeatOn", "true"));174 paramList.insert(StringPair("XAutoRepeatOn", "true")); 173 175 174 176 if (exclusiveMouse_ == TriBool::True || GraphicsManager::getInstance().isFullScreen()) 175 177 { 176 178 if (CommandLineParser::getValue("keyboard_no_grab").getBool()) 177 paramList.insert( std::make_pair("x11_keyboard_grab", "false"));179 paramList.insert(StringPair("x11_keyboard_grab", "false")); 178 180 else 179 paramList.insert( std::make_pair("x11_keyboard_grab", "true"));180 paramList.insert( std::make_pair("x11_mouse_grab", "true"));181 paramList.insert( std::make_pair("x11_mouse_hide", "true"));182 } 183 else 184 { 185 paramList.insert( std::make_pair("x11_keyboard_grab", "false"));186 paramList.insert( std::make_pair("x11_mouse_grab", "false"));187 paramList.insert( std::make_pair("x11_mouse_hide", "false"));181 paramList.insert(StringPair("x11_keyboard_grab", "true")); 182 paramList.insert(StringPair("x11_mouse_grab", "true")); 183 paramList.insert(StringPair("x11_mouse_hide", "true")); 184 } 185 else 186 { 187 paramList.insert(StringPair("x11_keyboard_grab", "false")); 188 paramList.insert(StringPair("x11_mouse_grab", "false")); 189 paramList.insert(StringPair("x11_mouse_hide", "false")); 188 190 } 189 191 #endif
Note: See TracChangeset
for help on using the changeset viewer.