summaryrefslogtreecommitdiff
path: root/src/core/hle/service/set
diff options
context:
space:
mode:
authorGravatar goaaats2018-01-19 21:44:58 +0100
committerGravatar bunnei2018-01-19 15:44:58 -0500
commitc457f34eb22eb43aa2beca0414e59f2a284715dd (patch)
treee0f344e4ff1d48d01d3aa89f655b8d442b5cfd51 /src/core/hle/service/set
parentMerge pull request #109 from bunnei/libnx-fixes (diff)
downloadyuzu-c457f34eb22eb43aa2beca0414e59f2a284715dd.tar.gz
yuzu-c457f34eb22eb43aa2beca0414e59f2a284715dd.tar.xz
yuzu-c457f34eb22eb43aa2beca0414e59f2a284715dd.zip
acc, set, applet_oe: stub various functions, add set service (#105)
* Stubs for various acc:u0 funcs needed * Stub for GetDesiredLanguage in IApplicationFunctions * Add set service + stubs needed for games * Fix formatting * Implement IProfile, IManagerForApplication, return bool in CheckAvailability, style fixes * Remove IProfile::Get(needs more research), fix IPC response sizes
Diffstat (limited to 'src/core/hle/service/set')
-rw-r--r--src/core/hle/service/set/set.cpp42
-rw-r--r--src/core/hle/service/set/set.h25
2 files changed, 67 insertions, 0 deletions
diff --git a/src/core/hle/service/set/set.cpp b/src/core/hle/service/set/set.cpp
new file mode 100644
index 000000000..3715acd74
--- /dev/null
+++ b/src/core/hle/service/set/set.cpp
@@ -0,0 +1,42 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include <chrono>
6#include "common/logging/log.h"
7#include "core/hle/ipc_helpers.h"
8#include "core/hle/kernel/client_port.h"
9#include "core/hle/kernel/client_session.h"
10#include "core/hle/service/set/set.h"
11
12namespace Service {
13namespace Set {
14
15void SET::GetAvailableLanguageCodes(Kernel::HLERequestContext& ctx) {
16 constexpr std::array<u8, 13> lang_codes{};
17
18 const auto& output_buffer = ctx.BufferDescriptorC()[0];
19
20 Memory::WriteBlock(output_buffer.Address(), lang_codes.data(), lang_codes.size());
21
22 IPC::RequestBuilder rb{ctx, 4};
23
24 rb.Push(RESULT_SUCCESS);
25 rb.Push(static_cast<u64>(lang_codes.size()));
26
27 LOG_WARNING(Service, "(STUBBED) called");
28}
29
30SET::SET(const char* name) : ServiceFramework(name) {
31 static const FunctionInfo functions[] = {
32 {1, &SET::GetAvailableLanguageCodes, "GetAvailableLanguageCodes"},
33 };
34 RegisterHandlers(functions);
35}
36
37void InstallInterfaces(SM::ServiceManager& service_manager) {
38 std::make_shared<SET>("set")->InstallAsService(service_manager);
39}
40
41} // namespace Set
42} // namespace Service
diff --git a/src/core/hle/service/set/set.h b/src/core/hle/service/set/set.h
new file mode 100644
index 000000000..61e957946
--- /dev/null
+++ b/src/core/hle/service/set/set.h
@@ -0,0 +1,25 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include "core/hle/service/service.h"
8
9namespace Service {
10namespace Set {
11
12class SET final : public ServiceFramework<SET> {
13public:
14 explicit SET(const char* name);
15 ~SET() = default;
16
17private:
18 void GetAvailableLanguageCodes(Kernel::HLERequestContext& ctx);
19};
20
21/// Registers all Set services with the specified service manager.
22void InstallInterfaces(SM::ServiceManager& service_manager);
23
24} // namespace Set
25} // namespace Service