summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-07-27 20:01:17 +0200
committerLioncash <mathew1800@gmail.com>2018-07-27 20:20:42 +0200
commitea8dd8b6505deddf0057203d73c9524b81d7af9f (patch)
tree454db21c398b52e933d92d76be7abf6be904f219 /src/core/hle/service
parentservice: Add the lbl service (diff)
downloadyuzu-ea8dd8b6505deddf0057203d73c9524b81d7af9f.tar
yuzu-ea8dd8b6505deddf0057203d73c9524b81d7af9f.tar.gz
yuzu-ea8dd8b6505deddf0057203d73c9524b81d7af9f.tar.bz2
yuzu-ea8dd8b6505deddf0057203d73c9524b81d7af9f.tar.lz
yuzu-ea8dd8b6505deddf0057203d73c9524b81d7af9f.tar.xz
yuzu-ea8dd8b6505deddf0057203d73c9524b81d7af9f.tar.zst
yuzu-ea8dd8b6505deddf0057203d73c9524b81d7af9f.zip
Diffstat (limited to 'src/core/hle/service')
-rw-r--r--src/core/hle/service/lbl/lbl.cpp38
1 files changed, 35 insertions, 3 deletions
diff --git a/src/core/hle/service/lbl/lbl.cpp b/src/core/hle/service/lbl/lbl.cpp
index 435911b0a..8fc8b1057 100644
--- a/src/core/hle/service/lbl/lbl.cpp
+++ b/src/core/hle/service/lbl/lbl.cpp
@@ -4,6 +4,9 @@
#include <memory>
+#include "common/logging/log.h"
+#include "core/hle/ipc_helpers.h"
+#include "core/hle/kernel/hle_ipc.h"
#include "core/hle/service/lbl/lbl.h"
#include "core/hle/service/service.h"
#include "core/hle/service/sm/sm.h"
@@ -41,14 +44,43 @@ public:
{23, nullptr, "Unknown20"},
{24, nullptr, "Unknown21"},
{25, nullptr, "Unknown22"},
- {26, nullptr, "EnableVrMode"},
- {27, nullptr, "DisableVrMode"},
- {28, nullptr, "GetVrMode"},
+ {26, &LBL::EnableVrMode, "EnableVrMode"},
+ {27, &LBL::DisableVrMode, "DisableVrMode"},
+ {28, &LBL::GetVrMode, "GetVrMode"},
};
// clang-format on
RegisterHandlers(functions);
}
+
+private:
+ void EnableVrMode(Kernel::HLERequestContext& ctx) {
+ IPC::ResponseBuilder rb{ctx, 2};
+ rb.Push(RESULT_SUCCESS);
+
+ vr_mode_enabled = true;
+
+ LOG_DEBUG(Service_LBL, "called");
+ }
+
+ void DisableVrMode(Kernel::HLERequestContext& ctx) {
+ IPC::ResponseBuilder rb{ctx, 2};
+ rb.Push(RESULT_SUCCESS);
+
+ vr_mode_enabled = false;
+
+ LOG_DEBUG(Service_LBL, "called");
+ }
+
+ void GetVrMode(Kernel::HLERequestContext& ctx) {
+ IPC::ResponseBuilder rb{ctx, 3};
+ rb.Push(RESULT_SUCCESS);
+ rb.Push(vr_mode_enabled);
+
+ LOG_DEBUG(Service_LBL, "called");
+ }
+
+ bool vr_mode_enabled = false;
};
void InstallInterfaces(SM::ServiceManager& sm) {