Explorar o código

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.
Lioncash %!s(int64=8) %!d(string=hai) anos
pai
achega
b6c47b578f
Modificáronse 1 ficheiros con 11 adicións e 5 borrados
  1. 11 5
      src/core/hle/service/mm/mm_u.cpp

+ 11 - 5
src/core/hle/service/mm/mm_u.cpp

@@ -14,12 +14,12 @@ public:
     explicit MM_U() : ServiceFramework{"mm:u"} {
     explicit MM_U() : ServiceFramework{"mm:u"} {
         // clang-format off
         // clang-format off
         static const FunctionInfo functions[] = {
         static const FunctionInfo functions[] = {
-            {0, nullptr, "InitializeOld"},
-            {1, nullptr, "FinalizeOld"},
-            {2, nullptr, "SetAndWaitOld"},
-            {3, nullptr, "GetOld"},
+            {0, &MM_U::Initialize, "InitializeOld"},
+            {1, &MM_U::Finalize, "FinalizeOld"},
+            {2, &MM_U::SetAndWait, "SetAndWaitOld"},
+            {3, &MM_U::Get, "GetOld"},
             {4, &MM_U::Initialize, "Initialize"},
             {4, &MM_U::Initialize, "Initialize"},
-            {5, nullptr, "Finalize"},
+            {5, &MM_U::Finalize, "Finalize"},
             {6, &MM_U::SetAndWait, "SetAndWait"},
             {6, &MM_U::SetAndWait, "SetAndWait"},
             {7, &MM_U::Get, "Get"},
             {7, &MM_U::Get, "Get"},
         };
         };
@@ -35,6 +35,12 @@ private:
         rb.Push(RESULT_SUCCESS);
         rb.Push(RESULT_SUCCESS);
     }
     }
 
 
+    void Finalize(Kernel::HLERequestContext& ctx) {
+        LOG_WARNING(Service_MM, "(STUBBED) called");
+        IPC::ResponseBuilder rb{ctx, 2};
+        rb.Push(RESULT_SUCCESS);
+    }
+
     void SetAndWait(Kernel::HLERequestContext& ctx) {
     void SetAndWait(Kernel::HLERequestContext& ctx) {
         IPC::RequestParser rp{ctx};
         IPC::RequestParser rp{ctx};
         min = rp.Pop<u32>();
         min = rp.Pop<u32>();