summaryrefslogtreecommitdiff
path: root/src/core/hle/service/pm
diff options
context:
space:
mode:
authorGravatar Lioncash2019-01-28 11:48:08 -0500
committerGravatar Lioncash2019-01-28 11:48:11 -0500
commit932922f67f6b2a6be05dd8d6c6966397367f2ca2 (patch)
tree2073e97d60489a10219cfb5e3bf9d21372898d1d /src/core/hle/service/pm
parentservice/pm: Tidy up functionality related to SystemBootMode (diff)
downloadyuzu-932922f67f6b2a6be05dd8d6c6966397367f2ca2.tar.gz
yuzu-932922f67f6b2a6be05dd8d6c6966397367f2ca2.tar.xz
yuzu-932922f67f6b2a6be05dd8d6c6966397367f2ca2.zip
service/pm: Implement SetMaintenanceBoot()
This quite literally functions as a basic setter. No other error checking or anything (since there's nothing to really check against). With this, it completes the pm:bm interface in terms of functionality.
Diffstat (limited to 'src/core/hle/service/pm')
-rw-r--r--src/core/hle/service/pm/pm.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/core/hle/service/pm/pm.cpp b/src/core/hle/service/pm/pm.cpp
index 40655532c..6b27dc4a3 100644
--- a/src/core/hle/service/pm/pm.cpp
+++ b/src/core/hle/service/pm/pm.cpp
@@ -13,7 +13,7 @@ public:
13 explicit BootMode() : ServiceFramework{"pm:bm"} { 13 explicit BootMode() : ServiceFramework{"pm:bm"} {
14 static const FunctionInfo functions[] = { 14 static const FunctionInfo functions[] = {
15 {0, &BootMode::GetBootMode, "GetBootMode"}, 15 {0, &BootMode::GetBootMode, "GetBootMode"},
16 {1, nullptr, "SetMaintenanceBoot"}, 16 {1, &BootMode::SetMaintenanceBoot, "SetMaintenanceBoot"},
17 }; 17 };
18 RegisterHandlers(functions); 18 RegisterHandlers(functions);
19 } 19 }
@@ -27,6 +27,15 @@ private:
27 rb.PushEnum(boot_mode); 27 rb.PushEnum(boot_mode);
28 } 28 }
29 29
30 void SetMaintenanceBoot(Kernel::HLERequestContext& ctx) {
31 LOG_DEBUG(Service_PM, "called");
32
33 boot_mode = SystemBootMode::Maintenance;
34
35 IPC::ResponseBuilder rb{ctx, 2};
36 rb.Push(RESULT_SUCCESS);
37 }
38
30 SystemBootMode boot_mode = SystemBootMode::Normal; 39 SystemBootMode boot_mode = SystemBootMode::Normal;
31}; 40};
32 41