mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-03 01:49:41 +00:00
open files in binary mode when necessary
This commit is contained in:
parent
86a8966306
commit
130349e0cd
2 changed files with 4 additions and 2 deletions
|
@ -27,7 +27,9 @@ void CSMDoc::OpenSaveStage::perform (int stage, Messages& messages)
|
|||
{
|
||||
mState.start (mDocument, mProjectFile);
|
||||
|
||||
mState.getStream().open (mProjectFile ? mState.getPath() : mState.getTmpPath());
|
||||
mState.getStream().open (
|
||||
mProjectFile ? mState.getPath() : mState.getTmpPath(),
|
||||
std::ios::binary);
|
||||
|
||||
if (!mState.getStream().is_open())
|
||||
throw std::runtime_error ("failed to open stream for saving");
|
||||
|
|
|
@ -52,7 +52,7 @@ void OgreRenderer::update(float dt)
|
|||
void OgreRenderer::screenshot(const std::string &file)
|
||||
{
|
||||
namespace bfs = boost::filesystem;
|
||||
bfs::ofstream out((bfs::path(file)));
|
||||
bfs::ofstream out(bfs::path(file), std::ios::binary);
|
||||
|
||||
Ogre::Image image;
|
||||
|
||||
|
|
Loading…
Reference in a new issue