ports/devel/mygui/patches/patch-Common_Base_Ogre_BaseManager_cpp

26 lines
935 B
Text
Raw Normal View History

2023-08-16 22:26:55 +00:00
Index: Common/Base/Ogre/BaseManager.cpp
--- Common/Base/Ogre/BaseManager.cpp.orig
+++ Common/Base/Ogre/BaseManager.cpp
2023-09-14 00:49:35 +00:00
@@ -36,15 +36,19 @@ namespace base
#if MYGUI_PLATFORM == MYGUI_PLATFORM_APPLE
const std::string resourcePath = macBundlePath() + "/Contents/Resources/";
#else
- const std::string resourcePath = "";
+ const std::string resourcePath = "${SYSCONFDIR}/MYGUI/";
#endif
2023-08-16 22:26:55 +00:00
Ogre::String pluginsPath;
+ char *homedir;
+ homedir = getenv("HOME");
+ std::string homePath;
2023-09-14 00:49:35 +00:00
+ homePath = homedir;
2023-08-16 22:26:55 +00:00
2023-09-14 00:49:35 +00:00
#ifndef OGRE_STATIC_LIB
pluginsPath = resourcePath + "plugins.cfg";
#endif
2023-08-16 22:26:55 +00:00
2023-09-14 00:49:35 +00:00
- mRoot = new Ogre::Root(pluginsPath, resourcePath + "ogre.cfg", resourcePath + "Ogre.log");
2023-08-16 22:26:55 +00:00
+ mRoot = new Ogre::Root(pluginsPath, homePath + "/mygui-ogre.cfg", homePath + "/mygui-Ogre.log");
2023-09-14 00:49:35 +00:00
auto renderSystem = mRoot->getRenderSystemByName(mRoot->getAvailableRenderers()[0]->getName());
mRoot->setRenderSystem(renderSystem);
2023-08-16 22:26:55 +00:00