1
0
Fork 0

apt: Add stub for ns:c service. (#6409)

This commit is contained in:
Steveice10 2023-04-04 10:01:37 -07:00 committed by GitHub
parent 55c1710dd6
commit 5f90c9816d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 51 additions and 1 deletions

View File

@ -220,6 +220,8 @@ add_library(core STATIC
hle/service/apt/apt_u.h
hle/service/apt/ns.cpp
hle/service/apt/ns.h
hle/service/apt/ns_c.cpp
hle/service/apt/ns_c.h
hle/service/apt/ns_s.cpp
hle/service/apt/ns_s.h
hle/service/apt/bcfnt/bcfnt.cpp

View File

@ -22,6 +22,7 @@
#include "core/hle/service/apt/apt_s.h"
#include "core/hle/service/apt/apt_u.h"
#include "core/hle/service/apt/bcfnt/bcfnt.h"
#include "core/hle/service/apt/ns_c.h"
#include "core/hle/service/apt/ns_s.h"
#include "core/hle/service/cfg/cfg.h"
#include "core/hle/service/fs/archive.h"
@ -1240,6 +1241,7 @@ void InstallInterfaces(Core::System& system) {
std::make_shared<APT_S>(apt)->InstallAsService(service_manager);
std::make_shared<APT_A>(apt)->InstallAsService(service_manager);
std::make_shared<Service::NS::NS_S>(apt)->InstallAsService(service_manager);
std::make_shared<Service::NS::NS_C>(apt)->InstallAsService(service_manager);
}
} // namespace Service::APT

View File

@ -0,0 +1,21 @@
// Copyright 2023 Citra Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include "common/archives.h"
#include "core/hle/service/apt/ns_c.h"
namespace Service::NS {
NS_C::NS_C(std::shared_ptr<Service::APT::Module> apt)
: Service::APT::Module::NSInterface(std::move(apt), "ns:c", 1) {
static const FunctionInfo functions[] = {
{0x00010100, nullptr, "LockSpecialContent"},
{0x00020100, nullptr, "UnlockSpecialContent"},
};
RegisterHandlers(functions);
}
} // namespace Service::NS
SERIALIZE_EXPORT_IMPL(Service::NS::NS_C)

View File

@ -0,0 +1,25 @@
// Copyright 2023 Citra Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#pragma once
#include "core/hle/kernel/kernel.h"
#include "core/hle/service/apt/apt.h"
#include "core/hle/service/service.h"
namespace Service::NS {
/// Interface to "ns:c" service
class NS_C final : public Service::APT::Module::NSInterface {
public:
explicit NS_C(std::shared_ptr<Service::APT::Module> apt);
private:
SERVICE_SERIALIZATION(NS_C, apt, Service::APT::Module)
};
} // namespace Service::NS
BOOST_CLASS_EXPORT_KEY(Service::NS::NS_C)
BOOST_SERIALIZATION_CONSTRUCT(Service::NS::NS_C)

View File

@ -8,7 +8,7 @@
namespace Service::NS {
NS_S::NS_S(std::shared_ptr<Service::APT::Module> apt)
: Service::APT::Module::NSInterface(std::move(apt), "ns:s", 2) {
: Service::APT::Module::NSInterface(std::move(apt), "ns:s", 3) {
static const FunctionInfo functions[] = {
{0x000100C0, nullptr, "LaunchFIRM"},
{0x000200C0, nullptr, "LaunchTitle"},