diff options
| author | 2024-02-18 10:37:52 -0500 | |
|---|---|---|
| committer | 2024-02-18 10:37:52 -0500 | |
| commit | 1fc86b1e3a7690abfa668bb45b45ac0d5e4cc4f6 (patch) | |
| tree | 61fd5e387c45642135fbcbb88ab326236f4f7789 /src/core/hle/service/am | |
| parent | Merge pull request #13064 from t895/auto-map-fail (diff) | |
| parent | service: erpt: Implement SubmitContext (diff) | |
| download | yuzu-1fc86b1e3a7690abfa668bb45b45ac0d5e4cc4f6.tar.gz yuzu-1fc86b1e3a7690abfa668bb45b45ac0d5e4cc4f6.tar.xz yuzu-1fc86b1e3a7690abfa668bb45b45ac0d5e4cc4f6.zip | |
Merge pull request #13032 from german77/qlauncher
service: Implement functions needed by Qlaunch
Diffstat (limited to 'src/core/hle/service/am')
3 files changed, 22 insertions, 4 deletions
diff --git a/src/core/hle/service/am/applet_manager.cpp b/src/core/hle/service/am/applet_manager.cpp index 4c7266f89..2e109181d 100644 --- a/src/core/hle/service/am/applet_manager.cpp +++ b/src/core/hle/service/am/applet_manager.cpp | |||
| @@ -35,6 +35,21 @@ AppletStorageChannel& InitializeFakeCallerApplet(Core::System& system, | |||
| 35 | return applet->caller_applet_broker->GetInData(); | 35 | return applet->caller_applet_broker->GetInData(); |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | void PushInShowQlaunch(Core::System& system, AppletStorageChannel& channel) { | ||
| 39 | const CommonArguments arguments{ | ||
| 40 | .arguments_version = CommonArgumentVersion::Version3, | ||
| 41 | .size = CommonArgumentSize::Version3, | ||
| 42 | .library_version = 0, | ||
| 43 | .theme_color = ThemeColor::BasicBlack, | ||
| 44 | .play_startup_sound = true, | ||
| 45 | .system_tick = system.CoreTiming().GetClockTicks(), | ||
| 46 | }; | ||
| 47 | |||
| 48 | std::vector<u8> argument_data(sizeof(arguments)); | ||
| 49 | std::memcpy(argument_data.data(), &arguments, sizeof(arguments)); | ||
| 50 | channel.Push(std::make_shared<IStorage>(system, std::move(argument_data))); | ||
| 51 | } | ||
| 52 | |||
| 38 | void PushInShowAlbum(Core::System& system, AppletStorageChannel& channel) { | 53 | void PushInShowAlbum(Core::System& system, AppletStorageChannel& channel) { |
| 39 | const CommonArguments arguments{ | 54 | const CommonArguments arguments{ |
| 40 | .arguments_version = CommonArgumentVersion::Version3, | 55 | .arguments_version = CommonArgumentVersion::Version3, |
| @@ -284,6 +299,9 @@ void AppletManager::CreateAndInsertByFrontendAppletParameters( | |||
| 284 | 299 | ||
| 285 | // Starting from frontend, some applets require input data. | 300 | // Starting from frontend, some applets require input data. |
| 286 | switch (applet->applet_id) { | 301 | switch (applet->applet_id) { |
| 302 | case AppletId::QLaunch: | ||
| 303 | PushInShowQlaunch(m_system, InitializeFakeCallerApplet(m_system, applet)); | ||
| 304 | break; | ||
| 287 | case AppletId::Cabinet: | 305 | case AppletId::Cabinet: |
| 288 | PushInShowCabinetData(m_system, InitializeFakeCallerApplet(m_system, applet)); | 306 | PushInShowCabinetData(m_system, InitializeFakeCallerApplet(m_system, applet)); |
| 289 | break; | 307 | break; |
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 7a3a86e88..94bd4dae6 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 | |||
| @@ -284,17 +284,17 @@ Result ILibraryAppletSelfAccessor::GetCurrentApplicationId(Out<u64> out_applicat | |||
| 284 | } | 284 | } |
| 285 | 285 | ||
| 286 | Result ILibraryAppletSelfAccessor::GetMainAppletAvailableUsers( | 286 | Result ILibraryAppletSelfAccessor::GetMainAppletAvailableUsers( |
| 287 | Out<bool> out_no_users_available, Out<s32> out_users_count, | 287 | Out<bool> out_can_select_any_user, Out<s32> out_users_count, |
| 288 | OutArray<Common::UUID, BufferAttr_HipcMapAlias> out_users) { | 288 | OutArray<Common::UUID, BufferAttr_HipcMapAlias> out_users) { |
| 289 | const Service::Account::ProfileManager manager{}; | 289 | const Service::Account::ProfileManager manager{}; |
| 290 | 290 | ||
| 291 | *out_no_users_available = true; | 291 | *out_can_select_any_user = false; |
| 292 | *out_users_count = -1; | 292 | *out_users_count = -1; |
| 293 | 293 | ||
| 294 | LOG_INFO(Service_AM, "called"); | 294 | LOG_INFO(Service_AM, "called"); |
| 295 | 295 | ||
| 296 | if (manager.GetUserCount() > 0) { | 296 | if (manager.GetUserCount() > 0) { |
| 297 | *out_no_users_available = false; | 297 | *out_can_select_any_user = true; |
| 298 | *out_users_count = static_cast<s32>(manager.GetUserCount()); | 298 | *out_users_count = static_cast<s32>(manager.GetUserCount()); |
| 299 | 299 | ||
| 300 | const auto users = manager.GetAllUsers(); | 300 | const auto users = manager.GetAllUsers(); |
diff --git a/src/core/hle/service/am/service/library_applet_self_accessor.h b/src/core/hle/service/am/service/library_applet_self_accessor.h index a9743569f..3e60393c2 100644 --- a/src/core/hle/service/am/service/library_applet_self_accessor.h +++ b/src/core/hle/service/am/service/library_applet_self_accessor.h | |||
| @@ -71,7 +71,7 @@ private: | |||
| 71 | ErrorCode error_code, InLargeData<ErrorContext, BufferAttr_HipcMapAlias> error_context); | 71 | ErrorCode error_code, InLargeData<ErrorContext, BufferAttr_HipcMapAlias> error_context); |
| 72 | Result GetMainAppletApplicationDesiredLanguage(Out<u64> out_desired_language); | 72 | Result GetMainAppletApplicationDesiredLanguage(Out<u64> out_desired_language); |
| 73 | Result GetCurrentApplicationId(Out<u64> out_application_id); | 73 | Result GetCurrentApplicationId(Out<u64> out_application_id); |
| 74 | Result GetMainAppletAvailableUsers(Out<bool> out_no_users_available, Out<s32> out_users_count, | 74 | Result GetMainAppletAvailableUsers(Out<bool> out_can_select_any_user, Out<s32> out_users_count, |
| 75 | OutArray<Common::UUID, BufferAttr_HipcMapAlias> out_users); | 75 | OutArray<Common::UUID, BufferAttr_HipcMapAlias> out_users); |
| 76 | Result ShouldSetGpuTimeSliceManually(Out<bool> out_should_set_gpu_time_slice_manually); | 76 | Result ShouldSetGpuTimeSliceManually(Out<bool> out_should_set_gpu_time_slice_manually); |
| 77 | Result Cmd160(Out<u64> out_unknown0); | 77 | Result Cmd160(Out<u64> out_unknown0); |