forked from mirror/openmw-tes3mp
Change openmw.log to boost ofstream to fix unicode path on windows (see https://github.com/OpenMW/openmw/pull/108)
This commit is contained in:
parent
73be457805
commit
d60df66811
1 changed files with 3 additions and 1 deletions
|
@ -10,6 +10,7 @@
|
|||
|
||||
#include <boost/iostreams/concepts.hpp>
|
||||
#include <boost/iostreams/stream_buffer.hpp>
|
||||
#include <boost/filesystem/fstream.hpp>
|
||||
|
||||
#if defined(_WIN32)
|
||||
// For OutputDebugString
|
||||
|
@ -309,7 +310,8 @@ int main(int argc, char**argv)
|
|||
std::cerr.rdbuf (&sb);
|
||||
#else
|
||||
// Redirect cout and cerr to openmw.log
|
||||
std::ofstream logfile (std::string(cfgMgr.getLogPath().string() + "/openmw.log").c_str());
|
||||
boost::filesystem::ofstream logfile (boost::filesystem::path(
|
||||
cfgMgr.getLogPath() / "/openmw.log"));
|
||||
|
||||
boost::iostreams::stream_buffer<Tee> coutsb;
|
||||
std::ostream oldcout(cout_rdbuf);
|
||||
|
|
Loading…
Reference in a new issue