diff options
| author | 2024-02-17 14:34:13 -0500 | |
|---|---|---|
| committer | 2024-02-18 10:35:39 -0500 | |
| commit | 2d43831d1f787fe96a30f668fe01bcb73061764c (patch) | |
| tree | 3f910ad14677b7b9464daf9ea34394d1be694def /src/core/hle/service/am | |
| parent | ns: rewrite IApplicationManagerInterface (diff) | |
| download | yuzu-2d43831d1f787fe96a30f668fe01bcb73061764c.tar.gz yuzu-2d43831d1f787fe96a30f668fe01bcb73061764c.tar.xz yuzu-2d43831d1f787fe96a30f668fe01bcb73061764c.zip | |
ns: rewrite IServiceGetterInterface
Diffstat (limited to 'src/core/hle/service/am')
| -rw-r--r-- | src/core/hle/service/am/service/application_functions.cpp | 8 | ||||
| -rw-r--r-- | src/core/hle/service/am/service/library_applet_self_accessor.cpp | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/src/core/hle/service/am/service/application_functions.cpp b/src/core/hle/service/am/service/application_functions.cpp index a40789c01..cb53b07e0 100644 --- a/src/core/hle/service/am/service/application_functions.cpp +++ b/src/core/hle/service/am/service/application_functions.cpp | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | #include "core/hle/service/filesystem/save_data_controller.h" | 17 | #include "core/hle/service/filesystem/save_data_controller.h" |
| 18 | #include "core/hle/service/glue/glue_manager.h" | 18 | #include "core/hle/service/glue/glue_manager.h" |
| 19 | #include "core/hle/service/ns/application_manager_interface.h" | 19 | #include "core/hle/service/ns/application_manager_interface.h" |
| 20 | #include "core/hle/service/ns/ns.h" | 20 | #include "core/hle/service/ns/service_getter_interface.h" |
| 21 | #include "core/hle/service/sm/sm.h" | 21 | #include "core/hle/service/sm/sm.h" |
| 22 | 22 | ||
| 23 | namespace Service::AM { | 23 | namespace Service::AM { |
| @@ -164,8 +164,10 @@ Result IApplicationFunctions::GetDesiredLanguage(Out<u64> out_language_code) { | |||
| 164 | 164 | ||
| 165 | // Call IApplicationManagerInterface implementation. | 165 | // Call IApplicationManagerInterface implementation. |
| 166 | auto& service_manager = system.ServiceManager(); | 166 | auto& service_manager = system.ServiceManager(); |
| 167 | auto ns_am2 = service_manager.GetService<NS::NS>("ns:am2"); | 167 | auto ns_am2 = service_manager.GetService<NS::IServiceGetterInterface>("ns:am2"); |
| 168 | auto app_man = ns_am2->GetApplicationManagerInterface(); | 168 | |
| 169 | std::shared_ptr<NS::IApplicationManagerInterface> app_man; | ||
| 170 | R_TRY(ns_am2->GetApplicationManagerInterface(&app_man)); | ||
| 169 | 171 | ||
| 170 | // Get desired application language | 172 | // Get desired application language |
| 171 | NS::ApplicationLanguage desired_language{}; | 173 | NS::ApplicationLanguage desired_language{}; |
diff --git a/src/core/hle/service/am/service/library_applet_self_accessor.cpp b/src/core/hle/service/am/service/library_applet_self_accessor.cpp index 932e354e0..963e67487 100644 --- a/src/core/hle/service/am/service/library_applet_self_accessor.cpp +++ b/src/core/hle/service/am/service/library_applet_self_accessor.cpp | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | #include "core/hle/service/filesystem/filesystem.h" | 15 | #include "core/hle/service/filesystem/filesystem.h" |
| 16 | #include "core/hle/service/glue/glue_manager.h" | 16 | #include "core/hle/service/glue/glue_manager.h" |
| 17 | #include "core/hle/service/ns/application_manager_interface.h" | 17 | #include "core/hle/service/ns/application_manager_interface.h" |
| 18 | #include "core/hle/service/ns/ns.h" | 18 | #include "core/hle/service/ns/service_getter_interface.h" |
| 19 | #include "core/hle/service/sm/sm.h" | 19 | #include "core/hle/service/sm/sm.h" |
| 20 | 20 | ||
| 21 | namespace Service::AM { | 21 | namespace Service::AM { |
| @@ -257,8 +257,10 @@ Result ILibraryAppletSelfAccessor::GetMainAppletApplicationDesiredLanguage( | |||
| 257 | 257 | ||
| 258 | // Call IApplicationManagerInterface implementation. | 258 | // Call IApplicationManagerInterface implementation. |
| 259 | auto& service_manager = system.ServiceManager(); | 259 | auto& service_manager = system.ServiceManager(); |
| 260 | auto ns_am2 = service_manager.GetService<NS::NS>("ns:am2"); | 260 | auto ns_am2 = service_manager.GetService<NS::IServiceGetterInterface>("ns:am2"); |
| 261 | auto app_man = ns_am2->GetApplicationManagerInterface(); | 261 | |
| 262 | std::shared_ptr<NS::IApplicationManagerInterface> app_man; | ||
| 263 | R_TRY(ns_am2->GetApplicationManagerInterface(&app_man)); | ||
| 262 | 264 | ||
| 263 | // Get desired application language | 265 | // Get desired application language |
| 264 | NS::ApplicationLanguage desired_language{}; | 266 | NS::ApplicationLanguage desired_language{}; |