early-access version 3909
This commit is contained in:
parent
d663a10fcf
commit
8c5b474690
4 changed files with 29 additions and 14 deletions
|
@ -1,7 +1,7 @@
|
||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 3908.
|
This is the source code for early-access 3909.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
#include "common/literals.h"
|
#include "common/literals.h"
|
||||||
#include "common/scope_exit.h"
|
#include "common/scope_exit.h"
|
||||||
|
#include "common/settings.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/hle/kernel/k_address_space_info.h"
|
#include "core/hle/kernel/k_address_space_info.h"
|
||||||
#include "core/hle/kernel/k_memory_block.h"
|
#include "core/hle/kernel/k_memory_block.h"
|
||||||
|
@ -337,11 +338,14 @@ Result KPageTable::InitializeForProcess(FileSys::ProgramAddressSpaceType as_type
|
||||||
}
|
}
|
||||||
|
|
||||||
void KPageTable::Finalize() {
|
void KPageTable::Finalize() {
|
||||||
|
auto HostUnmapCallback = [&](KProcessAddress addr, u64 size) {
|
||||||
|
if (Settings::IsFastmemEnabled()) {
|
||||||
|
m_system.DeviceMemory().buffer.Unmap(GetInteger(addr), size);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// Finalize memory blocks.
|
// Finalize memory blocks.
|
||||||
m_memory_block_manager.Finalize(m_memory_block_slab_manager,
|
m_memory_block_manager.Finalize(m_memory_block_slab_manager, std::move(HostUnmapCallback));
|
||||||
[&](KProcessAddress addr, u64 size) {
|
|
||||||
m_memory->UnmapRegion(*m_page_table_impl, addr, size);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Release any insecure mapped memory.
|
// Release any insecure mapped memory.
|
||||||
if (m_mapped_insecure_memory) {
|
if (m_mapped_insecure_memory) {
|
||||||
|
|
|
@ -855,6 +855,9 @@ FSP_SRV::FSP_SRV(Core::System& system_)
|
||||||
if (Settings::values.enable_fs_access_log) {
|
if (Settings::values.enable_fs_access_log) {
|
||||||
access_log_mode = AccessLogMode::SdCard;
|
access_log_mode = AccessLogMode::SdCard;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This should be true on creation
|
||||||
|
fsc.SetAutoSaveDataCreation(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
FSP_SRV::~FSP_SRV() = default;
|
FSP_SRV::~FSP_SRV() = default;
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <boost/container/flat_set.hpp>
|
||||||
|
|
||||||
// VFS includes must be before glad as they will conflict with Windows file api, which uses defines.
|
// 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_amiibo_settings.h"
|
||||||
#include "applets/qt_controller.h"
|
#include "applets/qt_controller.h"
|
||||||
|
@ -4697,8 +4699,8 @@ bool GMainWindow::CheckFirmwarePresence() {
|
||||||
|
|
||||||
bool GMainWindow::SelectRomFSDumpTarget(const FileSys::ContentProvider& installed, u64 program_id,
|
bool GMainWindow::SelectRomFSDumpTarget(const FileSys::ContentProvider& installed, u64 program_id,
|
||||||
u64* selected_title_id, u8* selected_content_record_type) {
|
u64* selected_title_id, u8* selected_content_record_type) {
|
||||||
using ContentInfo = std::pair<FileSys::TitleType, FileSys::ContentRecordType>;
|
using ContentInfo = std::tuple<u64, FileSys::TitleType, FileSys::ContentRecordType>;
|
||||||
boost::container::flat_map<u64, ContentInfo> available_title_ids;
|
boost::container::flat_set<ContentInfo> available_title_ids;
|
||||||
|
|
||||||
const auto RetrieveEntries = [&](FileSys::TitleType title_type,
|
const auto RetrieveEntries = [&](FileSys::TitleType title_type,
|
||||||
FileSys::ContentRecordType record_type) {
|
FileSys::ContentRecordType record_type) {
|
||||||
|
@ -4706,12 +4708,14 @@ bool GMainWindow::SelectRomFSDumpTarget(const FileSys::ContentProvider& installe
|
||||||
for (const auto& entry : entries) {
|
for (const auto& entry : entries) {
|
||||||
if (FileSys::GetBaseTitleID(entry.title_id) == program_id &&
|
if (FileSys::GetBaseTitleID(entry.title_id) == program_id &&
|
||||||
installed.GetEntry(entry)->GetStatus() == Loader::ResultStatus::Success) {
|
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::Program);
|
||||||
|
RetrieveEntries(FileSys::TitleType::Application, FileSys::ContentRecordType::HtmlDocument);
|
||||||
|
RetrieveEntries(FileSys::TitleType::Application, FileSys::ContentRecordType::LegalInformation);
|
||||||
RetrieveEntries(FileSys::TitleType::AOC, FileSys::ContentRecordType::Data);
|
RetrieveEntries(FileSys::TitleType::AOC, FileSys::ContentRecordType::Data);
|
||||||
|
|
||||||
if (available_title_ids.empty()) {
|
if (available_title_ids.empty()) {
|
||||||
|
@ -4722,10 +4726,14 @@ bool GMainWindow::SelectRomFSDumpTarget(const FileSys::ContentProvider& installe
|
||||||
|
|
||||||
if (available_title_ids.size() > 1) {
|
if (available_title_ids.size() > 1) {
|
||||||
QStringList list;
|
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));
|
const auto hex_title_id = QString::fromStdString(fmt::format("{:X}", title_id));
|
||||||
if (content_info.first == FileSys::TitleType::Application) {
|
if (record_type == FileSys::ContentRecordType::Program) {
|
||||||
list.push_back(QStringLiteral("Application [%1]").arg(hex_title_id));
|
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 {
|
} else {
|
||||||
list.push_back(
|
list.push_back(
|
||||||
QStringLiteral("DLC %1 [%2]").arg(title_id & 0x7FF).arg(hex_title_id));
|
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);
|
title_index = list.indexOf(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto selected_info = available_title_ids.nth(title_index);
|
const auto& [title_id, title_type, record_type] = *available_title_ids.nth(title_index);
|
||||||
*selected_title_id = selected_info->first;
|
*selected_title_id = title_id;
|
||||||
*selected_content_record_type = static_cast<u8>(selected_info->second.second);
|
*selected_content_record_type = static_cast<u8>(record_type);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue