[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

@@ -412,8 +412,9 @@ bool AudioMediaPlayer::LoadSongToMemory(std::vector<uint8_t>* buffer) {
buffer->resize(vfs_file->entry()->size());
size_t bytes_read = 0;
result = vfs_file->ReadSync(buffer->data(), vfs_file->entry()->size(), 0,
&bytes_read);
result = vfs_file->ReadSync(
std::span<uint8_t>(buffer->data(), vfs_file->entry()->size()), 0,
&bytes_read);
return !result;
}