diff options
| author | 2019-01-10 17:04:38 -0500 | |
|---|---|---|
| committer | 2019-01-10 17:04:38 -0500 | |
| commit | 83e8ad23310937bb72f4412c15f45231a19202f7 (patch) | |
| tree | 80301af69b14a701f16e21d41ced436850085031 /src/core/file_sys | |
| parent | Merge pull request #2010 from ReinUsesLisp/gmem (diff) | |
| parent | build: Copy web engine resources to correct location (diff) | |
| download | yuzu-83e8ad23310937bb72f4412c15f45231a19202f7.tar.gz yuzu-83e8ad23310937bb72f4412c15f45231a19202f7.tar.xz yuzu-83e8ad23310937bb72f4412c15f45231a19202f7.zip | |
Merge pull request #1939 from DarkLordZach/web-applet
applets: Implement HLE web browser applet (LibAppletOff)
Diffstat (limited to 'src/core/file_sys')
| -rw-r--r-- | src/core/file_sys/romfs.cpp | 3 | ||||
| -rw-r--r-- | src/core/file_sys/romfs.h | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/core/file_sys/romfs.cpp b/src/core/file_sys/romfs.cpp index 81e1f66ac..ebbdf081e 100644 --- a/src/core/file_sys/romfs.cpp +++ b/src/core/file_sys/romfs.cpp | |||
| @@ -119,6 +119,9 @@ VirtualDir ExtractRomFS(VirtualFile file, RomFSExtractionType type) { | |||
| 119 | 119 | ||
| 120 | VirtualDir out = std::move(root); | 120 | VirtualDir out = std::move(root); |
| 121 | 121 | ||
| 122 | if (type == RomFSExtractionType::SingleDiscard) | ||
| 123 | return out->GetSubdirectories().front(); | ||
| 124 | |||
| 122 | while (out->GetSubdirectories().size() == 1 && out->GetFiles().empty()) { | 125 | while (out->GetSubdirectories().size() == 1 && out->GetFiles().empty()) { |
| 123 | if (out->GetSubdirectories().front()->GetName() == "data" && | 126 | if (out->GetSubdirectories().front()->GetName() == "data" && |
| 124 | type == RomFSExtractionType::Truncated) | 127 | type == RomFSExtractionType::Truncated) |
diff --git a/src/core/file_sys/romfs.h b/src/core/file_sys/romfs.h index 0ec404731..0f35639bc 100644 --- a/src/core/file_sys/romfs.h +++ b/src/core/file_sys/romfs.h | |||
| @@ -33,8 +33,9 @@ struct IVFCHeader { | |||
| 33 | static_assert(sizeof(IVFCHeader) == 0xE0, "IVFCHeader has incorrect size."); | 33 | static_assert(sizeof(IVFCHeader) == 0xE0, "IVFCHeader has incorrect size."); |
| 34 | 34 | ||
| 35 | enum class RomFSExtractionType { | 35 | enum class RomFSExtractionType { |
| 36 | Full, // Includes data directory | 36 | Full, // Includes data directory |
| 37 | Truncated, // Traverses into data directory | 37 | Truncated, // Traverses into data directory |
| 38 | SingleDiscard, // Traverses into the first subdirectory of root | ||
| 38 | }; | 39 | }; |
| 39 | 40 | ||
| 40 | // Converts a RomFS binary blob to VFS Filesystem | 41 | // Converts a RomFS binary blob to VFS Filesystem |