Avoid flush on web ports

This commit is contained in:
dingusdev 2024-11-24 15:32:47 -07:00
parent f6dc704aff
commit c8e2a4d921

View File

@ -79,6 +79,8 @@ uint64_t ImgFile::write(const void* buf, uint64_t offset, uint64_t length)
{
impl->stream->seekg(offset, std::ios::beg);
impl->stream->write((const char *)buf, length);
impl->stream->flush();
#if defined(WIN32) || defined(__APPLE__) || defined(__linux)
impl->stream->flush();
#endif
return impl->stream->gcount();
}