diff options
Diffstat (limited to 'src/core/hle/kernel/archive.cpp')
| -rw-r--r-- | src/core/hle/kernel/archive.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/hle/kernel/archive.cpp b/src/core/hle/kernel/archive.cpp index 5d734d042..e911f4dc9 100644 --- a/src/core/hle/kernel/archive.cpp +++ b/src/core/hle/kernel/archive.cpp | |||
| @@ -367,6 +367,17 @@ Handle CreateArchive(FileSys::Archive* backend, const std::string& name) { | |||
| 367 | * @return Opened File object | 367 | * @return Opened File object |
| 368 | */ | 368 | */ |
| 369 | Handle OpenFileFromArchive(Handle archive_handle, const FileSys::Path& path, const FileSys::Mode mode) { | 369 | Handle OpenFileFromArchive(Handle archive_handle, const FileSys::Path& path, const FileSys::Mode mode) { |
| 370 | // TODO(bunnei): Binary type files get a raw file pointer to the archive. Currently, we create | ||
| 371 | // the archive file handles at app loading, and then keep them persistent throughout execution. | ||
| 372 | // Archives file handles are just reused and not actually freed until emulation shut down. | ||
| 373 | // Verify if real hardware works this way, or if new handles are created each time | ||
| 374 | if (path.GetType() == FileSys::Binary) | ||
| 375 | // TODO(bunnei): FixMe - this is a hack to compensate for an incorrect FileSys backend | ||
| 376 | // design. While the functionally of this is OK, our implementation decision to separate | ||
| 377 | // normal files from archive file pointers is very likely wrong. | ||
| 378 | // See https://github.com/citra-emu/citra/issues/205 | ||
| 379 | return archive_handle; | ||
| 380 | |||
| 370 | File* file = new File; | 381 | File* file = new File; |
| 371 | Handle handle = Kernel::g_object_pool.Create(file); | 382 | Handle handle = Kernel::g_object_pool.Create(file); |
| 372 | 383 | ||