summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2014-11-14 06:07:02 +0100
committerbunnei <bunneidev@gmail.com>2014-11-18 04:18:58 +0100
commit3e09c07378a73b959c02830e1c0ffb584a60087c (patch)
tree936e6b2571702777c7d050bca3ad0fdf8a2a6536 /src/core/hle/kernel
parentFileSys: Updated backend code to use FileSys::Path instead of string for paths. (diff)
downloadyuzu-3e09c07378a73b959c02830e1c0ffb584a60087c.tar
yuzu-3e09c07378a73b959c02830e1c0ffb584a60087c.tar.gz
yuzu-3e09c07378a73b959c02830e1c0ffb584a60087c.tar.bz2
yuzu-3e09c07378a73b959c02830e1c0ffb584a60087c.tar.lz
yuzu-3e09c07378a73b959c02830e1c0ffb584a60087c.tar.xz
yuzu-3e09c07378a73b959c02830e1c0ffb584a60087c.tar.zst
yuzu-3e09c07378a73b959c02830e1c0ffb584a60087c.zip
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/archive.cpp11
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) {
* @return Opened File object
*/
Handle OpenFileFromArchive(Handle archive_handle, const FileSys::Path& path, const FileSys::Mode mode) {
+ // TODO(bunnei): Binary type files get a raw file pointer to the archive. Currently, we create
+ // the archive file handles at app loading, and then keep them persistent throughout execution.
+ // Archives file handles are just reused and not actually freed until emulation shut down.
+ // Verify if real hardware works this way, or if new handles are created each time
+ if (path.GetType() == FileSys::Binary)
+ // TODO(bunnei): FixMe - this is a hack to compensate for an incorrect FileSys backend
+ // design. While the functionally of this is OK, our implementation decision to separate
+ // normal files from archive file pointers is very likely wrong.
+ // See https://github.com/citra-emu/citra/issues/205
+ return archive_handle;
+
File* file = new File;
Handle handle = Kernel::g_object_pool.Create(file);