summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Lioncash2018-07-27 13:48:33 -0400
committerGravatar Lioncash2018-07-27 14:20:07 -0400
commitc2c543e8f7ee0bc69c529ef073ab7513b9ed2729 (patch)
treed7b810fc830212a12564627369c72f5df7080278
parentMerge pull request #837 from lioncash/priv (diff)
downloadyuzu-c2c543e8f7ee0bc69c529ef073ab7513b9ed2729.tar.gz
yuzu-c2c543e8f7ee0bc69c529ef073ab7513b9ed2729.tar.xz
yuzu-c2c543e8f7ee0bc69c529ef073ab7513b9ed2729.zip
service: Add the lbl service
Adds the skeleton of the lbl service based off the information provided by Switch Brew.
-rw-r--r--src/core/CMakeLists.txt2
-rw-r--r--src/core/hle/service/lbl/lbl.cpp58
-rw-r--r--src/core/hle/service/lbl/lbl.h15
-rw-r--r--src/core/hle/service/service.cpp2
4 files changed, 77 insertions, 0 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index b74e495ef..e44ae05c3 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -164,6 +164,8 @@ add_library(core STATIC
164 hle/service/hid/irs.h 164 hle/service/hid/irs.h
165 hle/service/hid/xcd.cpp 165 hle/service/hid/xcd.cpp
166 hle/service/hid/xcd.h 166 hle/service/hid/xcd.h
167 hle/service/lbl/lbl.cpp
168 hle/service/lbl/lbl.h
167 hle/service/ldn/ldn.cpp 169 hle/service/ldn/ldn.cpp
168 hle/service/ldn/ldn.h 170 hle/service/ldn/ldn.h
169 hle/service/ldr/ldr.cpp 171 hle/service/ldr/ldr.cpp
diff --git a/src/core/hle/service/lbl/lbl.cpp b/src/core/hle/service/lbl/lbl.cpp
new file mode 100644
index 000000000..435911b0a
--- /dev/null
+++ b/src/core/hle/service/lbl/lbl.cpp
@@ -0,0 +1,58 @@
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 <memory>
6
7#include "core/hle/service/lbl/lbl.h"
8#include "core/hle/service/service.h"
9#include "core/hle/service/sm/sm.h"
10
11namespace Service::LBL {
12
13class LBL final : public ServiceFramework<LBL> {
14public:
15 explicit LBL() : ServiceFramework{"lbl"} {
16 // clang-format off
17 static const FunctionInfo functions[] = {
18 {0, nullptr, "Unknown1"},
19 {1, nullptr, "Unknown2"},
20 {2, nullptr, "Unknown3"},
21 {3, nullptr, "Unknown4"},
22 {4, nullptr, "Unknown5"},
23 {5, nullptr, "Unknown6"},
24 {6, nullptr, "TurnOffBacklight"},
25 {7, nullptr, "TurnOnBacklight"},
26 {8, nullptr, "GetBacklightStatus"},
27 {9, nullptr, "Unknown7"},
28 {10, nullptr, "Unknown8"},
29 {11, nullptr, "Unknown9"},
30 {12, nullptr, "Unknown10"},
31 {13, nullptr, "Unknown11"},
32 {14, nullptr, "Unknown12"},
33 {15, nullptr, "Unknown13"},
34 {16, nullptr, "ReadRawLightSensor"},
35 {17, nullptr, "Unknown14"},
36 {18, nullptr, "Unknown15"},
37 {19, nullptr, "Unknown16"},
38 {20, nullptr, "Unknown17"},
39 {21, nullptr, "Unknown18"},
40 {22, nullptr, "Unknown19"},
41 {23, nullptr, "Unknown20"},
42 {24, nullptr, "Unknown21"},
43 {25, nullptr, "Unknown22"},
44 {26, nullptr, "EnableVrMode"},
45 {27, nullptr, "DisableVrMode"},
46 {28, nullptr, "GetVrMode"},
47 };
48 // clang-format on
49
50 RegisterHandlers(functions);
51 }
52};
53
54void InstallInterfaces(SM::ServiceManager& sm) {
55 std::make_shared<LBL>()->InstallAsService(sm);
56}
57
58} // namespace Service::LBL
diff --git a/src/core/hle/service/lbl/lbl.h b/src/core/hle/service/lbl/lbl.h
new file mode 100644
index 000000000..bf6f400f8
--- /dev/null
+++ b/src/core/hle/service/lbl/lbl.h
@@ -0,0 +1,15 @@
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
7namespace Service::SM {
8class ServiceManager;
9}
10
11namespace Service::LBL {
12
13void InstallInterfaces(SM::ServiceManager& sm);
14
15} // namespace Service::LBL
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp
index 8b84fd349..eb3db1b4d 100644
--- a/src/core/hle/service/service.cpp
+++ b/src/core/hle/service/service.cpp
@@ -29,6 +29,7 @@
29#include "core/hle/service/friend/friend.h" 29#include "core/hle/service/friend/friend.h"
30#include "core/hle/service/grc/grc.h" 30#include "core/hle/service/grc/grc.h"
31#include "core/hle/service/hid/hid.h" 31#include "core/hle/service/hid/hid.h"
32#include "core/hle/service/lbl/lbl.h"
32#include "core/hle/service/ldn/ldn.h" 33#include "core/hle/service/ldn/ldn.h"
33#include "core/hle/service/ldr/ldr.h" 34#include "core/hle/service/ldr/ldr.h"
34#include "core/hle/service/lm/lm.h" 35#include "core/hle/service/lm/lm.h"
@@ -203,6 +204,7 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) {
203 Friend::InstallInterfaces(*sm); 204 Friend::InstallInterfaces(*sm);
204 GRC::InstallInterfaces(*sm); 205 GRC::InstallInterfaces(*sm);
205 HID::InstallInterfaces(*sm); 206 HID::InstallInterfaces(*sm);
207 LBL::InstallInterfaces(*sm);
206 LDN::InstallInterfaces(*sm); 208 LDN::InstallInterfaces(*sm);
207 LDR::InstallInterfaces(*sm); 209 LDR::InstallInterfaces(*sm);
208 LM::InstallInterfaces(*sm); 210 LM::InstallInterfaces(*sm);