[Stream] Reimplement the correct stream writing (thx @TheApadayo)
This commit is contained in:
parent
64e76c905e
commit
33754f40aa
@ -96,9 +96,15 @@ namespace Utils
|
||||
|
||||
char* Stream::save(Game::XFILE_BLOCK_TYPES stream, const void * _str, size_t size, size_t count)
|
||||
{
|
||||
//if (stream == XFILE_BLOCK_TEMP || stream == XFILE_BLOCK_VIRTUAL || stream == XFILE_BLOCK_PHYSICAL) // Only those seem to actually write data.
|
||||
// Only those seem to actually write data.
|
||||
// As I'm not sure though, I'll still write the data
|
||||
// Use IncreaseBlockSize to fill virtual streams
|
||||
if (stream != Game::XFILE_BLOCK_TEMP && stream != Game::XFILE_BLOCK_VIRTUAL && stream != Game::XFILE_BLOCK_PHYSICAL)
|
||||
{
|
||||
this->increaseBlockSize(stream, size * count);
|
||||
return this->at();
|
||||
}
|
||||
|
||||
auto data = this->data();
|
||||
|
||||
if (this->isCriticalSection() && this->length() + (size * count) > this->capacity())
|
||||
|
Loading…
Reference in New Issue
Block a user