mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-27 05:10:26 +00:00
Merge branch 'fix-mygui-log' into 'master'
Fix MyGUI log Closes #5900 See merge request OpenMW/openmw!660
This commit is contained in:
commit
49ec7c2053
2 changed files with 5 additions and 1 deletions
|
@ -189,7 +189,7 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
float uiScale = Settings::Manager::getFloat("scaling factor", "GUI");
|
float uiScale = Settings::Manager::getFloat("scaling factor", "GUI");
|
||||||
mGuiPlatform = new osgMyGUI::Platform(viewer, guiRoot, resourceSystem->getImageManager(), uiScale);
|
mGuiPlatform = new osgMyGUI::Platform(viewer, guiRoot, resourceSystem->getImageManager(), uiScale);
|
||||||
mGuiPlatform->initialise(resourcePath, logpath);
|
mGuiPlatform->initialise(resourcePath, (boost::filesystem::path(logpath) / "MyGUI.log").generic_string());
|
||||||
|
|
||||||
mGui = new MyGUI::Gui;
|
mGui = new MyGUI::Gui;
|
||||||
mGui->initialise("");
|
mGui->initialise("");
|
||||||
|
|
|
@ -2,11 +2,15 @@
|
||||||
|
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
|
||||||
|
#include <components/debug/debuglog.hpp>
|
||||||
|
|
||||||
namespace osgMyGUI
|
namespace osgMyGUI
|
||||||
{
|
{
|
||||||
void CustomLogListener::open()
|
void CustomLogListener::open()
|
||||||
{
|
{
|
||||||
mStream.open(boost::filesystem::path(mFileName), std::ios_base::out);
|
mStream.open(boost::filesystem::path(mFileName), std::ios_base::out);
|
||||||
|
if (!mStream.is_open())
|
||||||
|
Log(Debug::Error) << "Unable to create MyGUI log with path " << mFileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CustomLogListener::close()
|
void CustomLogListener::close()
|
||||||
|
|
Loading…
Reference in a new issue