diff --git a/README.md b/README.md
index 695000d16..e57f7c409 100755
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
yuzu emulator early access
=============
-This is the source code for early-access 3960.
+This is the source code for early-access 3961.
## Legal Notice
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt
index 6e19fc6c0..ed2a5cb55 100755
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt
@@ -84,28 +84,6 @@ class HomeSettingsFragment : Fragment() {
}
)
)
- add(
- HomeSetting(
- R.string.open_user_folder,
- R.string.open_user_folder_description,
- R.drawable.ic_folder_open,
- { openFileManager() }
- )
- )
- add(
- HomeSetting(
- R.string.preferences_theme,
- R.string.theme_and_color_description,
- R.drawable.ic_palette,
- {
- val action = HomeNavigationDirections.actionGlobalSettingsActivity(
- null,
- Settings.MenuTag.SECTION_THEME
- )
- binding.root.findNavController().navigate(action)
- }
- )
- )
add(
HomeSetting(
R.string.gpu_driver_manager,
@@ -121,17 +99,6 @@ class HomeSettingsFragment : Fragment() {
driverViewModel.selectedDriverMetadata
)
)
- add(
- HomeSetting(
- R.string.manage_yuzu_data,
- R.string.manage_yuzu_data_description,
- R.drawable.ic_install,
- {
- binding.root.findNavController()
- .navigate(R.id.action_homeSettingsFragment_to_installableFragment)
- }
- )
- )
add(
HomeSetting(
R.string.applets,
@@ -146,6 +113,17 @@ class HomeSettingsFragment : Fragment() {
R.string.applets_error_description
)
)
+ add(
+ HomeSetting(
+ R.string.manage_yuzu_data,
+ R.string.manage_yuzu_data_description,
+ R.drawable.ic_install,
+ {
+ binding.root.findNavController()
+ .navigate(R.id.action_homeSettingsFragment_to_installableFragment)
+ }
+ )
+ )
add(
HomeSetting(
R.string.select_games_folder,
@@ -170,6 +148,28 @@ class HomeSettingsFragment : Fragment() {
{ shareLog() }
)
)
+ add(
+ HomeSetting(
+ R.string.open_user_folder,
+ R.string.open_user_folder_description,
+ R.drawable.ic_folder_open,
+ { openFileManager() }
+ )
+ )
+ add(
+ HomeSetting(
+ R.string.preferences_theme,
+ R.string.theme_and_color_description,
+ R.drawable.ic_palette,
+ {
+ val action = HomeNavigationDirections.actionGlobalSettingsActivity(
+ null,
+ Settings.MenuTag.SECTION_THEME
+ )
+ binding.root.findNavController().navigate(action)
+ }
+ )
+ )
add(
HomeSetting(
R.string.about,
diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml
index b92978140..c551a6106 100755
--- a/src/android/app/src/main/res/values/strings.xml
+++ b/src/android/app/src/main/res/values/strings.xml
@@ -72,7 +72,7 @@
Invalid encryption keys
https://yuzu-emu.org/help/quickstart/#dumping-decryption-keys
The selected file is incorrect or corrupt. Please redump your keys.
- GPU Driver Manager
+ GPU driver manager
Install GPU driver
Install alternative drivers for potentially better performance or accuracy
Advanced settings
diff --git a/src/core/file_sys/romfs.cpp b/src/core/file_sys/romfs.cpp
index 4ad8533e7..22d2955e4 100755
--- a/src/core/file_sys/romfs.cpp
+++ b/src/core/file_sys/romfs.cpp
@@ -35,13 +35,14 @@ struct RomFSHeader {
static_assert(sizeof(RomFSHeader) == 0x50, "RomFSHeader has incorrect size.");
struct DirectoryEntry {
+ u32_le parent;
u32_le sibling;
u32_le child_dir;
u32_le child_file;
u32_le hash;
u32_le name_length;
};
-static_assert(sizeof(DirectoryEntry) == 0x14, "DirectoryEntry has incorrect size.");
+static_assert(sizeof(DirectoryEntry) == 0x18, "DirectoryEntry has incorrect size.");
struct FileEntry {
u32_le parent;
@@ -64,25 +65,22 @@ std::pair GetEntry(const VirtualFile& file, std::size_t offs
return {entry, string};
}
-void ProcessFile(VirtualFile file, std::size_t file_offset, std::size_t data_offset,
- u32 this_file_offset, std::shared_ptr parent) {
- while (true) {
+void ProcessFile(const VirtualFile& file, std::size_t file_offset, std::size_t data_offset,
+ u32 this_file_offset, std::shared_ptr& parent) {
+ while (this_file_offset != ROMFS_ENTRY_EMPTY) {
auto entry = GetEntry(file, file_offset + this_file_offset);
parent->AddFile(std::make_shared(
file, entry.first.size, entry.first.offset + data_offset, entry.second));
- if (entry.first.sibling == ROMFS_ENTRY_EMPTY)
- break;
-
this_file_offset = entry.first.sibling;
}
}
-void ProcessDirectory(VirtualFile file, std::size_t dir_offset, std::size_t file_offset,
+void ProcessDirectory(const VirtualFile& file, std::size_t dir_offset, std::size_t file_offset,
std::size_t data_offset, u32 this_dir_offset,
- std::shared_ptr parent) {
- while (true) {
+ std::shared_ptr& parent) {
+ while (this_dir_offset != ROMFS_ENTRY_EMPTY) {
auto entry = GetEntry(file, dir_offset + this_dir_offset);
auto current = std::make_shared(
std::vector{}, std::vector{}, entry.second);
@@ -97,14 +95,12 @@ void ProcessDirectory(VirtualFile file, std::size_t dir_offset, std::size_t file
}
parent->AddDirectory(current);
- if (entry.first.sibling == ROMFS_ENTRY_EMPTY)
- break;
this_dir_offset = entry.first.sibling;
}
}
} // Anonymous namespace
-VirtualDir ExtractRomFS(VirtualFile file, RomFSExtractionType type) {
+VirtualDir ExtractRomFS(VirtualFile file) {
RomFSHeader header{};
if (file->ReadObject(&header) != sizeof(RomFSHeader))
return nullptr;
@@ -113,27 +109,17 @@ VirtualDir ExtractRomFS(VirtualFile file, RomFSExtractionType type) {
return nullptr;
const u64 file_offset = header.file_meta.offset;
- const u64 dir_offset = header.directory_meta.offset + 4;
+ const u64 dir_offset = header.directory_meta.offset;
- auto root =
- std::make_shared(std::vector{}, std::vector{},
- file->GetName(), file->GetContainingDirectory());
+ auto root_container = std::make_shared();
- ProcessDirectory(file, dir_offset, file_offset, header.data_offset, 0, root);
+ ProcessDirectory(file, dir_offset, file_offset, header.data_offset, 0, root_container);
- VirtualDir out = std::move(root);
-
- if (type == RomFSExtractionType::SingleDiscard)
- return out->GetSubdirectories().front();
-
- while (out->GetSubdirectories().size() == 1 && out->GetFiles().empty()) {
- if (Common::ToLower(out->GetSubdirectories().front()->GetName()) == "data" &&
- type == RomFSExtractionType::Truncated)
- break;
- out = out->GetSubdirectories().front();
+ if (auto root = root_container->GetSubdirectory(""); root) {
+ return std::make_shared(std::move(root));
}
- return std::make_shared(std::move(out));
+ return nullptr;
}
VirtualFile CreateRomFS(VirtualDir dir, VirtualDir ext) {
diff --git a/src/core/file_sys/romfs.h b/src/core/file_sys/romfs.h
index d74f7ce9d..1835836db 100755
--- a/src/core/file_sys/romfs.h
+++ b/src/core/file_sys/romfs.h
@@ -7,16 +7,9 @@
namespace FileSys {
-enum class RomFSExtractionType {
- Full, // Includes data directory
- Truncated, // Traverses into data directory
- SingleDiscard, // Traverses into the first subdirectory of root
-};
-
// Converts a RomFS binary blob to VFS Filesystem
// Returns nullptr on failure
-VirtualDir ExtractRomFS(VirtualFile file,
- RomFSExtractionType type = RomFSExtractionType::Truncated);
+VirtualDir ExtractRomFS(VirtualFile file);
// Converts a VFS filesystem into a RomFS binary
// Returns nullptr on failure
diff --git a/src/core/hle/service/am/applets/applet_web_browser.cpp b/src/core/hle/service/am/applets/applet_web_browser.cpp
index 7894c3762..4cec088b6 100755
--- a/src/core/hle/service/am/applets/applet_web_browser.cpp
+++ b/src/core/hle/service/am/applets/applet_web_browser.cpp
@@ -330,8 +330,7 @@ void WebBrowser::ExtractOfflineRomFS() {
LOG_DEBUG(Service_AM, "Extracting RomFS to {}",
Common::FS::PathToUTF8String(offline_cache_dir));
- const auto extracted_romfs_dir =
- FileSys::ExtractRomFS(offline_romfs, FileSys::RomFSExtractionType::SingleDiscard);
+ const auto extracted_romfs_dir = FileSys::ExtractRomFS(offline_romfs);
const auto temp_dir = system.GetFilesystem()->CreateDirectory(
Common::FS::PathToUTF8String(offline_cache_dir), FileSys::Mode::ReadWrite);
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index f9e204629..6e986c307 100755
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -2738,7 +2738,7 @@ void GMainWindow::OnGameListDumpRomFS(u64 program_id, const std::string& game_pa
return;
}
- const auto extracted = FileSys::ExtractRomFS(romfs, FileSys::RomFSExtractionType::Full);
+ const auto extracted = FileSys::ExtractRomFS(romfs);
if (extracted == nullptr) {
failed();
return;