Compare commits
7 Commits
android-20
...
android-20
Author | SHA1 | Date | |
---|---|---|---|
ceef790cbb | |||
910718dc91 | |||
4bb06f44fa | |||
a76f6a2775 | |||
ba518f6899 | |||
fc5d76e6e2 | |||
5f9a45ada9 |
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "common/scope_exit.h"
|
#include "common/scope_exit.h"
|
||||||
|
#include "common/string_util.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/hle/kernel/k_event.h"
|
#include "core/hle/kernel/k_event.h"
|
||||||
#include "core/hle/kernel/k_process.h"
|
#include "core/hle/kernel/k_process.h"
|
||||||
@ -29,7 +30,7 @@ void NVDRV::Open(HLERequestContext& ctx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const auto& buffer = ctx.ReadBuffer();
|
const auto& buffer = ctx.ReadBuffer();
|
||||||
const std::string device_name(buffer.begin(), buffer.end());
|
const std::string device_name(Common::StringFromBuffer(buffer));
|
||||||
|
|
||||||
if (device_name == "/dev/nvhost-prof-gpu") {
|
if (device_name == "/dev/nvhost-prof-gpu") {
|
||||||
rb.Push<DeviceFD>(0);
|
rb.Push<DeviceFD>(0);
|
||||||
|
@ -709,12 +709,12 @@ void ISystemSettingsServer::GetSettingsItemValueSize(HLERequestContext& ctx) {
|
|||||||
// The category of the setting. This corresponds to the top-level keys of
|
// The category of the setting. This corresponds to the top-level keys of
|
||||||
// system_settings.ini.
|
// system_settings.ini.
|
||||||
const auto setting_category_buf{ctx.ReadBuffer(0)};
|
const auto setting_category_buf{ctx.ReadBuffer(0)};
|
||||||
const std::string setting_category{setting_category_buf.begin(), setting_category_buf.end()};
|
const std::string setting_category{Common::StringFromBuffer(setting_category_buf)};
|
||||||
|
|
||||||
// The name of the setting. This corresponds to the second-level keys of
|
// The name of the setting. This corresponds to the second-level keys of
|
||||||
// system_settings.ini.
|
// system_settings.ini.
|
||||||
const auto setting_name_buf{ctx.ReadBuffer(1)};
|
const auto setting_name_buf{ctx.ReadBuffer(1)};
|
||||||
const std::string setting_name{setting_name_buf.begin(), setting_name_buf.end()};
|
const std::string setting_name{Common::StringFromBuffer(setting_name_buf)};
|
||||||
|
|
||||||
auto settings{GetSettings()};
|
auto settings{GetSettings()};
|
||||||
u64 response_size{0};
|
u64 response_size{0};
|
||||||
@ -732,12 +732,12 @@ void ISystemSettingsServer::GetSettingsItemValue(HLERequestContext& ctx) {
|
|||||||
// The category of the setting. This corresponds to the top-level keys of
|
// The category of the setting. This corresponds to the top-level keys of
|
||||||
// system_settings.ini.
|
// system_settings.ini.
|
||||||
const auto setting_category_buf{ctx.ReadBuffer(0)};
|
const auto setting_category_buf{ctx.ReadBuffer(0)};
|
||||||
const std::string setting_category{setting_category_buf.begin(), setting_category_buf.end()};
|
const std::string setting_category{Common::StringFromBuffer(setting_category_buf)};
|
||||||
|
|
||||||
// The name of the setting. This corresponds to the second-level keys of
|
// The name of the setting. This corresponds to the second-level keys of
|
||||||
// system_settings.ini.
|
// system_settings.ini.
|
||||||
const auto setting_name_buf{ctx.ReadBuffer(1)};
|
const auto setting_name_buf{ctx.ReadBuffer(1)};
|
||||||
const std::string setting_name{setting_name_buf.begin(), setting_name_buf.end()};
|
const std::string setting_name{Common::StringFromBuffer(setting_name_buf)};
|
||||||
|
|
||||||
std::vector<u8> value;
|
std::vector<u8> value;
|
||||||
auto response = GetSettingsItemValue(value, setting_category, setting_name);
|
auto response = GetSettingsItemValue(value, setting_category, setting_name);
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "common/math_util.h"
|
#include "common/math_util.h"
|
||||||
#include "common/settings.h"
|
#include "common/settings.h"
|
||||||
|
#include "common/string_util.h"
|
||||||
#include "common/swap.h"
|
#include "common/swap.h"
|
||||||
#include "core/core_timing.h"
|
#include "core/core_timing.h"
|
||||||
#include "core/hle/kernel/k_readable_event.h"
|
#include "core/hle/kernel/k_readable_event.h"
|
||||||
@ -694,9 +695,7 @@ private:
|
|||||||
void OpenLayer(HLERequestContext& ctx) {
|
void OpenLayer(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto name_buf = rp.PopRaw<std::array<u8, 0x40>>();
|
const auto name_buf = rp.PopRaw<std::array<u8, 0x40>>();
|
||||||
const auto end = std::find(name_buf.begin(), name_buf.end(), '\0');
|
const std::string display_name(Common::StringFromBuffer(name_buf));
|
||||||
|
|
||||||
const std::string display_name(name_buf.begin(), end);
|
|
||||||
|
|
||||||
const u64 layer_id = rp.Pop<u64>();
|
const u64 layer_id = rp.Pop<u64>();
|
||||||
const u64 aruid = rp.Pop<u64>();
|
const u64 aruid = rp.Pop<u64>();
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include "core/file_sys/nca_metadata.h"
|
#include "core/file_sys/nca_metadata.h"
|
||||||
#include "core/file_sys/patch_manager.h"
|
#include "core/file_sys/patch_manager.h"
|
||||||
#include "core/file_sys/registered_cache.h"
|
#include "core/file_sys/registered_cache.h"
|
||||||
|
#include "core/file_sys/romfs_factory.h"
|
||||||
#include "core/file_sys/submission_package.h"
|
#include "core/file_sys/submission_package.h"
|
||||||
#include "core/hle/kernel/k_process.h"
|
#include "core/hle/kernel/k_process.h"
|
||||||
#include "core/hle/service/filesystem/filesystem.h"
|
#include "core/hle/service/filesystem/filesystem.h"
|
||||||
@ -109,6 +110,13 @@ AppLoader_NSP::LoadResult AppLoader_NSP::Load(Kernel::KProcess& process, Core::S
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (nsp->IsExtractedType()) {
|
||||||
|
system.GetFileSystemController().RegisterProcess(
|
||||||
|
process.GetProcessId(), {},
|
||||||
|
std::make_shared<FileSys::RomFSFactory>(*this, system.GetContentProvider(),
|
||||||
|
system.GetFileSystemController()));
|
||||||
|
}
|
||||||
|
|
||||||
FileSys::VirtualFile update_raw;
|
FileSys::VirtualFile update_raw;
|
||||||
if (ReadUpdateRaw(update_raw) == ResultStatus::Success && update_raw != nullptr) {
|
if (ReadUpdateRaw(update_raw) == ResultStatus::Success && update_raw != nullptr) {
|
||||||
system.GetFileSystemController().SetPackedUpdate(process.GetProcessId(),
|
system.GetFileSystemController().SetPackedUpdate(process.GetProcessId(),
|
||||||
|
Reference in New Issue
Block a user