diff --git a/README.md b/README.md index d90d6276c..07bbeafac 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 3908. +This is the source code for early-access 3909. ## Legal Notice diff --git a/src/core/hle/kernel/k_page_table.cpp b/src/core/hle/kernel/k_page_table.cpp index a7d5e020d..872d80150 100755 --- a/src/core/hle/kernel/k_page_table.cpp +++ b/src/core/hle/kernel/k_page_table.cpp @@ -5,6 +5,7 @@ #include "common/assert.h" #include "common/literals.h" #include "common/scope_exit.h" +#include "common/settings.h" #include "core/core.h" #include "core/hle/kernel/k_address_space_info.h" #include "core/hle/kernel/k_memory_block.h" @@ -337,11 +338,14 @@ Result KPageTable::InitializeForProcess(FileSys::ProgramAddressSpaceType as_type } void KPageTable::Finalize() { + auto HostUnmapCallback = [&](KProcessAddress addr, u64 size) { + if (Settings::IsFastmemEnabled()) { + m_system.DeviceMemory().buffer.Unmap(GetInteger(addr), size); + } + }; + // Finalize memory blocks. - m_memory_block_manager.Finalize(m_memory_block_slab_manager, - [&](KProcessAddress addr, u64 size) { - m_memory->UnmapRegion(*m_page_table_impl, addr, size); - }); + m_memory_block_manager.Finalize(m_memory_block_slab_manager, std::move(HostUnmapCallback)); // Release any insecure mapped memory. if (m_mapped_insecure_memory) { diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index d86ba0cb1..e078a71a4 100755 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp @@ -855,6 +855,9 @@ FSP_SRV::FSP_SRV(Core::System& system_) if (Settings::values.enable_fs_access_log) { access_log_mode = AccessLogMode::SdCard; } + + // This should be true on creation + fsc.SetAutoSaveDataCreation(true); } FSP_SRV::~FSP_SRV() = default; diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 560bc5228..dd9efda34 100755 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -18,6 +18,8 @@ #include #endif +#include + // VFS includes must be before glad as they will conflict with Windows file api, which uses defines. #include "applets/qt_amiibo_settings.h" #include "applets/qt_controller.h" @@ -4697,8 +4699,8 @@ bool GMainWindow::CheckFirmwarePresence() { bool GMainWindow::SelectRomFSDumpTarget(const FileSys::ContentProvider& installed, u64 program_id, u64* selected_title_id, u8* selected_content_record_type) { - using ContentInfo = std::pair; - boost::container::flat_map available_title_ids; + using ContentInfo = std::tuple; + boost::container::flat_set available_title_ids; const auto RetrieveEntries = [&](FileSys::TitleType title_type, FileSys::ContentRecordType record_type) { @@ -4706,12 +4708,14 @@ bool GMainWindow::SelectRomFSDumpTarget(const FileSys::ContentProvider& installe for (const auto& entry : entries) { if (FileSys::GetBaseTitleID(entry.title_id) == program_id && installed.GetEntry(entry)->GetStatus() == Loader::ResultStatus::Success) { - available_title_ids[entry.title_id] = {title_type, record_type}; + available_title_ids.insert({entry.title_id, title_type, record_type}); } } }; RetrieveEntries(FileSys::TitleType::Application, FileSys::ContentRecordType::Program); + RetrieveEntries(FileSys::TitleType::Application, FileSys::ContentRecordType::HtmlDocument); + RetrieveEntries(FileSys::TitleType::Application, FileSys::ContentRecordType::LegalInformation); RetrieveEntries(FileSys::TitleType::AOC, FileSys::ContentRecordType::Data); if (available_title_ids.empty()) { @@ -4722,10 +4726,14 @@ bool GMainWindow::SelectRomFSDumpTarget(const FileSys::ContentProvider& installe if (available_title_ids.size() > 1) { QStringList list; - for (auto& [title_id, content_info] : available_title_ids) { + for (auto& [title_id, title_type, record_type] : available_title_ids) { const auto hex_title_id = QString::fromStdString(fmt::format("{:X}", title_id)); - if (content_info.first == FileSys::TitleType::Application) { - list.push_back(QStringLiteral("Application [%1]").arg(hex_title_id)); + if (record_type == FileSys::ContentRecordType::Program) { + list.push_back(QStringLiteral("Program [%1]").arg(hex_title_id)); + } else if (record_type == FileSys::ContentRecordType::HtmlDocument) { + list.push_back(QStringLiteral("HTML document [%1]").arg(hex_title_id)); + } else if (record_type == FileSys::ContentRecordType::LegalInformation) { + list.push_back(QStringLiteral("Legal information [%1]").arg(hex_title_id)); } else { list.push_back( QStringLiteral("DLC %1 [%2]").arg(title_id & 0x7FF).arg(hex_title_id)); @@ -4743,9 +4751,9 @@ bool GMainWindow::SelectRomFSDumpTarget(const FileSys::ContentProvider& installe title_index = list.indexOf(res); } - const auto selected_info = available_title_ids.nth(title_index); - *selected_title_id = selected_info->first; - *selected_content_record_type = static_cast(selected_info->second.second); + const auto& [title_id, title_type, record_type] = *available_title_ids.nth(title_index); + *selected_title_id = title_id; + *selected_content_record_type = static_cast(record_type); return true; }