HLE: Move NS:S into APT and remove NS
parent
84b40f2da6
commit
b62ca12e88
@ -1,39 +0,0 @@
|
||||
// Copyright 2017 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <cinttypes>
|
||||
#include "core/core.h"
|
||||
#include "core/hle/service/am/am.h"
|
||||
#include "core/hle/service/ns/ns.h"
|
||||
#include "core/hle/service/ns/ns_s.h"
|
||||
#include "core/loader/loader.h"
|
||||
|
||||
namespace Service::NS {
|
||||
|
||||
std::shared_ptr<Kernel::Process> LaunchTitle(FS::MediaType media_type, u64 title_id) {
|
||||
std::string path = AM::GetTitleContentPath(media_type, title_id);
|
||||
auto loader = Loader::GetLoader(path);
|
||||
|
||||
if (!loader) {
|
||||
LOG_WARNING(Service_NS, "Could not find .app for title 0x{:016x}", title_id);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::shared_ptr<Kernel::Process> process;
|
||||
Loader::ResultStatus result = loader->Load(process);
|
||||
|
||||
if (result != Loader::ResultStatus::Success) {
|
||||
LOG_WARNING(Service_NS, "Error loading .app for title 0x{:016x}", title_id);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return process;
|
||||
}
|
||||
|
||||
void InstallInterfaces(Core::System& system) {
|
||||
auto& service_manager = system.ServiceManager();
|
||||
std::make_shared<NS_S>()->InstallAsService(service_manager);
|
||||
}
|
||||
|
||||
} // namespace Service::NS
|
@ -1,24 +0,0 @@
|
||||
// Copyright 2017 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include "core/hle/kernel/process.h"
|
||||
#include "core/hle/service/fs/archive.h"
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace Core {
|
||||
class System;
|
||||
}
|
||||
|
||||
namespace Service::NS {
|
||||
|
||||
/// Loads and launches the title identified by title_id in the specified media type.
|
||||
std::shared_ptr<Kernel::Process> LaunchTitle(FS::MediaType media_type, u64 title_id);
|
||||
|
||||
/// Registers all NS services with the specified service manager.
|
||||
void InstallInterfaces(Core::System& system);
|
||||
|
||||
} // namespace Service::NS
|
Loading…
Reference in New Issue