diff options
| author | 2014-11-14 00:07:02 -0500 | |
|---|---|---|
| committer | 2014-11-17 22:18:58 -0500 | |
| commit | 3e09c07378a73b959c02830e1c0ffb584a60087c (patch) | |
| tree | 936e6b2571702777c7d050bca3ad0fdf8a2a6536 /src/core/hle/kernel/archive.cpp | |
| parent | FileSys: Updated backend code to use FileSys::Path instead of string for paths. (diff) | |
| download | yuzu-3e09c07378a73b959c02830e1c0ffb584a60087c.tar.gz yuzu-3e09c07378a73b959c02830e1c0ffb584a60087c.tar.xz yuzu-3e09c07378a73b959c02830e1c0ffb584a60087c.zip | |
FS_User: Support FileSye::Path in a more generic way.
added a todo to kernel archive
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 | ||