summaryrefslogtreecommitdiff
path: root/src/core/hle/service/nfp
diff options
context:
space:
mode:
authorGravatar Narr the Reg2023-04-14 17:46:20 -0600
committerGravatar german772023-04-23 23:28:09 -0600
commita3fa64fcc489d2cc1776807a37db3464dcc32686 (patch)
tree2ec9e6abd4b588f6584ec41ea6edf816ad25c98c /src/core/hle/service/nfp
parentMerge pull request #10074 from Kelebek1/fermi_blit (diff)
downloadyuzu-a3fa64fcc489d2cc1776807a37db3464dcc32686.tar.gz
yuzu-a3fa64fcc489d2cc1776807a37db3464dcc32686.tar.xz
yuzu-a3fa64fcc489d2cc1776807a37db3464dcc32686.zip
service: nfc: Create interface
Diffstat (limited to 'src/core/hle/service/nfp')
-rw-r--r--src/core/hle/service/nfp/nfp.cpp24
1 files changed, 3 insertions, 21 deletions
diff --git a/src/core/hle/service/nfp/nfp.cpp b/src/core/hle/service/nfp/nfp.cpp
index 2714f4bea..2559fe598 100644
--- a/src/core/hle/service/nfp/nfp.cpp
+++ b/src/core/hle/service/nfp/nfp.cpp
@@ -152,16 +152,10 @@ private:
152 void CreateUserInterface(HLERequestContext& ctx) { 152 void CreateUserInterface(HLERequestContext& ctx) {
153 LOG_DEBUG(Service_NFP, "called"); 153 LOG_DEBUG(Service_NFP, "called");
154 154
155 if (user_interface == nullptr) {
156 user_interface = std::make_shared<IUser>(system);
157 }
158
159 IPC::ResponseBuilder rb{ctx, 2, 0, 1}; 155 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
160 rb.Push(ResultSuccess); 156 rb.Push(ResultSuccess);
161 rb.PushIpcInterface<IUser>(user_interface); 157 rb.PushIpcInterface<IUser>(system);
162 } 158 }
163
164 std::shared_ptr<IUser> user_interface;
165}; 159};
166 160
167class ISystemManager final : public ServiceFramework<ISystemManager> { 161class ISystemManager final : public ServiceFramework<ISystemManager> {
@@ -180,16 +174,10 @@ private:
180 void CreateSystemInterface(HLERequestContext& ctx) { 174 void CreateSystemInterface(HLERequestContext& ctx) {
181 LOG_DEBUG(Service_NFP, "called"); 175 LOG_DEBUG(Service_NFP, "called");
182 176
183 if (system_interface == nullptr) {
184 system_interface = std::make_shared<ISystem>(system);
185 }
186
187 IPC::ResponseBuilder rb{ctx, 2, 0, 1}; 177 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
188 rb.Push(ResultSuccess); 178 rb.Push(ResultSuccess);
189 rb.PushIpcInterface<ISystem>(system_interface); 179 rb.PushIpcInterface<ISystem>(system);
190 } 180 }
191
192 std::shared_ptr<ISystem> system_interface;
193}; 181};
194 182
195class IDebugManager final : public ServiceFramework<IDebugManager> { 183class IDebugManager final : public ServiceFramework<IDebugManager> {
@@ -208,16 +196,10 @@ private:
208 void CreateDebugInterface(HLERequestContext& ctx) { 196 void CreateDebugInterface(HLERequestContext& ctx) {
209 LOG_DEBUG(Service_NFP, "called"); 197 LOG_DEBUG(Service_NFP, "called");
210 198
211 if (system_interface == nullptr) {
212 system_interface = std::make_shared<IDebug>(system);
213 }
214
215 IPC::ResponseBuilder rb{ctx, 2, 0, 1}; 199 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
216 rb.Push(ResultSuccess); 200 rb.Push(ResultSuccess);
217 rb.PushIpcInterface<IDebug>(system_interface); 201 rb.PushIpcInterface<IDebug>(system);
218 } 202 }
219
220 std::shared_ptr<IDebug> system_interface;
221}; 203};
222 204
223void LoopProcess(Core::System& system) { 205void LoopProcess(Core::System& system) {