|
|
@ -8,6 +8,8 @@
|
|
|
|
#include <OgreStringConverter.h>
|
|
|
|
#include <OgreStringConverter.h>
|
|
|
|
#include <OgreDataStream.h>
|
|
|
|
#include <OgreDataStream.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <components/files/constrainedfiledatastream.hpp>
|
|
|
|
|
|
|
|
|
|
|
|
using namespace Settings;
|
|
|
|
using namespace Settings;
|
|
|
|
|
|
|
|
|
|
|
|
namespace bfs = boost::filesystem;
|
|
|
|
namespace bfs = boost::filesystem;
|
|
|
@ -19,15 +21,13 @@ CategorySettingValueMap Manager::mNewSettings = CategorySettingValueMap();
|
|
|
|
|
|
|
|
|
|
|
|
void Manager::loadUser (const std::string& file)
|
|
|
|
void Manager::loadUser (const std::string& file)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bfs::ifstream fin((bfs::path(file)));
|
|
|
|
Ogre::DataStreamPtr stream = openConstrainedFileDataStream(file.c_str());
|
|
|
|
Ogre::DataStreamPtr stream((OGRE_NEW Ogre::FileStreamDataStream(file, &fin, false)));
|
|
|
|
|
|
|
|
mFile.load(stream);
|
|
|
|
mFile.load(stream);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Manager::loadDefault (const std::string& file)
|
|
|
|
void Manager::loadDefault (const std::string& file)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bfs::ifstream fin((bfs::path(file)));
|
|
|
|
Ogre::DataStreamPtr stream = openConstrainedFileDataStream(file.c_str());
|
|
|
|
Ogre::DataStreamPtr stream((OGRE_NEW Ogre::FileStreamDataStream(file, &fin, false)));
|
|
|
|
|
|
|
|
mDefaultFile.load(stream);
|
|
|
|
mDefaultFile.load(stream);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|