[VFS] Rewrote STFS to use memory mapping

- Replaced old-style buffer, buffer_length with std::span
- Added STFS and SVOD specific Entry and File classes
- Other smaller improvements
This commit is contained in:
Gliniak
2025-05-13 21:05:46 +02:00
committed by Radosław Gliński
parent e85c2392ba
commit fe739208b6
36 changed files with 481 additions and 206 deletions

View File

@@ -391,7 +391,8 @@ X_STATUS VirtualFileSystem::ExtractContentFile(Entry* entry,
while (remaining_size > 0) {
size_t bytes_read = 0;
in_file->ReadSync(buffer, write_buffer_size, offset, &bytes_read);
in_file->ReadSync(std::span<uint8_t>(buffer, write_buffer_size), offset,
&bytes_read);
fwrite(buffer, bytes_read, 1, file);
offset += bytes_read;
remaining_size -= bytes_read;