summaryrefslogtreecommitdiff
path: root/src/core/hle/service/mm
diff options
context:
space:
mode:
authorGravatar David Marcec2018-10-19 01:09:34 +1100
committerGravatar David Marcec2018-10-19 01:09:34 +1100
commit98c7a6d62277803e1bde9dc13b5bfd74421e0f35 (patch)
tree9d60a234d94420d13651cfa4ddf73435753c62d1 /src/core/hle/service/mm
parentMerge pull request #1444 from ogniK5377/better-hid (diff)
downloadyuzu-98c7a6d62277803e1bde9dc13b5bfd74421e0f35.tar.gz
yuzu-98c7a6d62277803e1bde9dc13b5bfd74421e0f35.tar.xz
yuzu-98c7a6d62277803e1bde9dc13b5bfd74421e0f35.zip
Used better names for mm:u and fixed bad stub
InitializeWithId needs to return an id which is a u32 which should be a non zero value
Diffstat (limited to 'src/core/hle/service/mm')
-rw-r--r--src/core/hle/service/mm/mm_u.cpp50
1 files changed, 42 insertions, 8 deletions
diff --git a/src/core/hle/service/mm/mm_u.cpp b/src/core/hle/service/mm/mm_u.cpp
index 7b91bb258..e1f17a926 100644
--- a/src/core/hle/service/mm/mm_u.cpp
+++ b/src/core/hle/service/mm/mm_u.cpp
@@ -14,14 +14,14 @@ 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, &MM_U::Initialize, "InitializeOld"}, 17 {0, &MM_U::Initialize, "Initialize"},
18 {1, &MM_U::Finalize, "FinalizeOld"}, 18 {1, &MM_U::Finalize, "Finalize"},
19 {2, &MM_U::SetAndWait, "SetAndWaitOld"}, 19 {2, &MM_U::SetAndWait, "SetAndWait"},
20 {3, &MM_U::Get, "GetOld"}, 20 {3, &MM_U::Get, "Get"},
21 {4, &MM_U::Initialize, "Initialize"}, 21 {4, &MM_U::InitializeWithId, "InitializeWithId"},
22 {5, &MM_U::Finalize, "Finalize"}, 22 {5, &MM_U::FinalizeWithId, "FinalizeWithId"},
23 {6, &MM_U::SetAndWait, "SetAndWait"}, 23 {6, &MM_U::SetAndWaitWithId, "SetAndWaitWithId"},
24 {7, &MM_U::Get, "Get"}, 24 {7, &MM_U::GetWithId, "GetWithId"},
25 }; 25 };
26 // clang-format on 26 // clang-format on
27 27
@@ -59,9 +59,43 @@ private:
59 rb.Push(current); 59 rb.Push(current);
60 } 60 }
61 61
62 void InitializeWithId(Kernel::HLERequestContext& ctx) {
63 LOG_WARNING(Service_MM, "(STUBBED) called");
64 IPC::ResponseBuilder rb{ctx, 3};
65 rb.Push(RESULT_SUCCESS);
66 rb.Push<u32>(id); // Any non zero value
67 }
68
69 void FinalizeWithId(Kernel::HLERequestContext& ctx) {
70 LOG_WARNING(Service_MM, "(STUBBED) called");
71 IPC::ResponseBuilder rb{ctx, 2};
72 rb.Push(RESULT_SUCCESS);
73 }
74
75 void SetAndWaitWithId(Kernel::HLERequestContext& ctx) {
76 IPC::RequestParser rp{ctx};
77 u32 input_id = rp.Pop<u32>();
78 min = rp.Pop<u32>();
79 max = rp.Pop<u32>();
80 current = min;
81
82 LOG_WARNING(Service_MM, "(STUBBED) called, input_id=0x{:X}, min=0x{:X}, max=0x{:X}",
83 input_id, min, max);
84 IPC::ResponseBuilder rb{ctx, 2};
85 rb.Push(RESULT_SUCCESS);
86 }
87
88 void GetWithId(Kernel::HLERequestContext& ctx) {
89 LOG_WARNING(Service_MM, "(STUBBED) called");
90 IPC::ResponseBuilder rb{ctx, 3};
91 rb.Push(RESULT_SUCCESS);
92 rb.Push(current);
93 }
94
62 u32 min{0}; 95 u32 min{0};
63 u32 max{0}; 96 u32 max{0};
64 u32 current{0}; 97 u32 current{0};
98 u32 id{1};
65}; 99};
66 100
67void InstallInterfaces(SM::ServiceManager& service_manager) { 101void InstallInterfaces(SM::ServiceManager& service_manager) {