al2950
13-02-2010 18:45:37
Firstly thank you for this great library, I have been using it for a couple of weeks not and i am loving it! The following change is something i did to get it to work the way i wanted, i am not sure if it will break other stuff or is the correct way to fix my problem!
This is a fix to a problem i was having as i had several resource groups and if you initialised MyGUI with 'AUTODETECT_RESOURCE_GROUP_NAME' MyGUI would not find any resources!
The problem lies in MyGUI_OgreDataManager.cpp line 82. The problem is that it check if the resource exists by using the ogre method 'findResourceFileInfo' however that method does not work with 'AUTODETECT_RESOURCE_GROUP_NAME'. To fix this i changed the method OgreDataManager::isDataExist from;
TO:
PS I am using Ogre 1.7
This is a fix to a problem i was having as i had several resource groups and if you initialised MyGUI with 'AUTODETECT_RESOURCE_GROUP_NAME' MyGUI would not find any resources!
The problem lies in MyGUI_OgreDataManager.cpp line 82. The problem is that it check if the resource exists by using the ogre method 'findResourceFileInfo' however that method does not work with 'AUTODETECT_RESOURCE_GROUP_NAME'. To fix this i changed the method OgreDataManager::isDataExist from;
bool OgreDataManager::isDataExist(const std::string& _name)
{
const VectorString& files = getDataListNames(_name);
return (files.size() == 1);
}
TO:
bool OgreDataManager::isDataExist(const std::string& _name)
{
const VectorString& files = getDataListNames(_name);
return Ogre::ResourceGroupManager::getSingleton().resourceExistsInAnyGroup(_name);
}
PS I am using Ogre 1.7