mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 15:45:31 +00:00
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/concepts.hpp>
|
||||||
#include <boost/iostreams/stream_buffer.hpp>
|
#include <boost/iostreams/stream_buffer.hpp>
|
||||||
|
#include <boost/filesystem/fstream.hpp>
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
// For OutputDebugString
|
// For OutputDebugString
|
||||||
|
@ -309,7 +310,8 @@ int main(int argc, char**argv)
|
||||||
std::cerr.rdbuf (&sb);
|
std::cerr.rdbuf (&sb);
|
||||||
#else
|
#else
|
||||||
// Redirect cout and cerr to openmw.log
|
// 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;
|
boost::iostreams::stream_buffer<Tee> coutsb;
|
||||||
std::ostream oldcout(cout_rdbuf);
|
std::ostream oldcout(cout_rdbuf);
|
||||||
|
|
Loading…
Reference in a new issue