[Orxonox-commit 4907] r9576 - code/trunk/src/libraries/core
landauf at orxonox.net
landauf at orxonox.net
Mon Mar 25 21:40:27 CET 2013
Author: landauf
Date: 2013-03-25 21:40:27 +0100 (Mon, 25 Mar 2013)
New Revision: 9576
Modified:
code/trunk/src/libraries/core/GUIManager.cc
Log:
fall back to default parser if CEGUI cannot load XercesParser
Modified: code/trunk/src/libraries/core/GUIManager.cc
===================================================================
--- code/trunk/src/libraries/core/GUIManager.cc 2013-03-25 12:18:15 UTC (rev 9575)
+++ code/trunk/src/libraries/core/GUIManager.cc 2013-03-25 20:40:27 UTC (rev 9576)
@@ -317,8 +317,18 @@
guiSystem_ = &System::create(*guiRenderer_, resourceProvider_, 0, imageCodec_, scriptModule_);
#endif
- // Force Xerces parser (CEGUI 0.7.5+)
- CEGUI::System::getSingleton().setXMLParser("XercesParser");
+ CEGUI::String defaultXMLParserName = CEGUI::System::getSingleton().getDefaultXMLParserName();
+ try
+ {
+ // Force Xerces parser (CEGUI 0.7.5+)
+ CEGUI::System::getSingleton().setXMLParser("XercesParser");
+ }
+ catch (const CEGUI::GenericException& e)
+ {
+ // Fall back to default parser
+ orxout(internal_warning) << "Cannot use XercesParser for CEGUI - using " << defaultXMLParserName << " instead" << endl;
+ CEGUI::System::getSingleton().setXMLParser(defaultXMLParserName);
+ }
// Align CEGUI mouse with OIS mouse
guiSystem_->injectMousePosition((float)mousePosition.first, (float)mousePosition.second);
More information about the Orxonox-commit
mailing list