summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2018-08-13 18:54:22 -0400
committerGravatar Lioncash2018-08-13 18:59:10 -0400
commitb6c47b578f2945c0909728e26b1c3dd6982a59a5 (patch)
treec3c506ed983bf9273318470068e48178d5786cf9 /src
parentmm_u: Move implementation class into the cpp file (diff)
downloadyuzu-b6c47b578f2945c0909728e26b1c3dd6982a59a5.tar.gz
yuzu-b6c47b578f2945c0909728e26b1c3dd6982a59a5.tar.xz
yuzu-b6c47b578f2945c0909728e26b1c3dd6982a59a5.zip
mm_u: Forward all old variants of functions to the new ones
Ensures both variants go through the same interface, and while we're at it, add Finalize to provide the inverse of Initialize for consistency.
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/mm/mm_u.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/core/hle/service/mm/mm_u.cpp b/src/core/hle/service/mm/mm_u.cpp
index 0183c6e2e..7b91bb258 100644
--- a/src/core/hle/service/mm/mm_u.cpp
+++ b/src/core/hle/service/mm/mm_u.cpp
@@ -14,12 +14,12 @@ public:
14 explicit MM_U() : ServiceFramework{"mm:u"} { 14 explicit MM_U() : ServiceFramework{"mm:u"} {
15 // clang-format off 15 // clang-format off
16 static const FunctionInfo functions[] = { 16 static const FunctionInfo functions[] = {
17 {0, nullptr, "InitializeOld"}, 17 {0, &MM_U::Initialize, "InitializeOld"},
18 {1, nullptr, "FinalizeOld"}, 18 {1, &MM_U::Finalize, "FinalizeOld"},
19 {2, nullptr, "SetAndWaitOld"}, 19 {2, &MM_U::SetAndWait, "SetAndWaitOld"},
20 {3, nullptr, "GetOld"}, 20 {3, &MM_U::Get, "GetOld"},
21 {4, &MM_U::Initialize, "Initialize"}, 21 {4, &MM_U::Initialize, "Initialize"},
22 {5, nullptr, "Finalize"}, 22 {5, &MM_U::Finalize, "Finalize"},
23 {6, &MM_U::SetAndWait, "SetAndWait"}, 23 {6, &MM_U::SetAndWait, "SetAndWait"},
24 {7, &MM_U::Get, "Get"}, 24 {7, &MM_U::Get, "Get"},
25 }; 25 };
@@ -35,6 +35,12 @@ private:
35 rb.Push(RESULT_SUCCESS); 35 rb.Push(RESULT_SUCCESS);
36 } 36 }
37 37
38 void Finalize(Kernel::HLERequestContext& ctx) {
39 LOG_WARNING(Service_MM, "(STUBBED) called");
40 IPC::ResponseBuilder rb{ctx, 2};
41 rb.Push(RESULT_SUCCESS);
42 }
43
38 void SetAndWait(Kernel::HLERequestContext& ctx) { 44 void SetAndWait(Kernel::HLERequestContext& ctx) {
39 IPC::RequestParser rp{ctx}; 45 IPC::RequestParser rp{ctx};
40 min = rp.Pop<u32>(); 46 min = rp.Pop<u32>();