Просмотр исходного кода

IPC: Allow passing arguments to the Interfaces when using PushIpcInterface

Subv 8 лет назад
Родитель
Сommit
fb73e8b723
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      src/core/hle/ipc_helpers.h

+ 3 - 3
src/core/hle/ipc_helpers.h

@@ -98,9 +98,9 @@ public:
         PushRaw(data_payload_header);
     }
 
-    template <class T>
-    void PushIpcInterface() {
-        context->AddDomainObject(std::make_shared<T>());
+    template <class T, class... Args>
+    void PushIpcInterface(Args&&... args) {
+        context->AddDomainObject(std::make_shared<T>(std::forward<Args>(args)...));
     }
 
     // Validate on destruction, as there shouldn't be any case where we don't want it