diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/acc/acc.cpp | 43 | ||||
| -rw-r--r-- | src/core/hle/service/acc/acc.h | 3 | ||||
| -rw-r--r-- | src/core/hle/service/acc/acc_su.cpp | 6 | ||||
| -rw-r--r-- | src/core/hle/service/acc/profile_manager.h | 3 | ||||
| -rw-r--r-- | src/core/hle/service/am/am.cpp | 41 | ||||
| -rw-r--r-- | src/core/hle/service/am/am.h | 3 |
6 files changed, 91 insertions, 8 deletions
diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index b971401e6..b7d14060c 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp | |||
| @@ -49,7 +49,7 @@ public: | |||
| 49 | : ServiceFramework{system_, "IManagerForSystemService"} { | 49 | : ServiceFramework{system_, "IManagerForSystemService"} { |
| 50 | // clang-format off | 50 | // clang-format off |
| 51 | static const FunctionInfo functions[] = { | 51 | static const FunctionInfo functions[] = { |
| 52 | {0, nullptr, "CheckAvailability"}, | 52 | {0, &IManagerForSystemService::CheckAvailability, "CheckAvailability"}, |
| 53 | {1, nullptr, "GetAccountId"}, | 53 | {1, nullptr, "GetAccountId"}, |
| 54 | {2, nullptr, "EnsureIdTokenCacheAsync"}, | 54 | {2, nullptr, "EnsureIdTokenCacheAsync"}, |
| 55 | {3, nullptr, "LoadIdTokenCache"}, | 55 | {3, nullptr, "LoadIdTokenCache"}, |
| @@ -78,6 +78,13 @@ public: | |||
| 78 | 78 | ||
| 79 | RegisterHandlers(functions); | 79 | RegisterHandlers(functions); |
| 80 | } | 80 | } |
| 81 | |||
| 82 | private: | ||
| 83 | void CheckAvailability(HLERequestContext& ctx) { | ||
| 84 | LOG_WARNING(Service_ACC, "(STUBBED) called"); | ||
| 85 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 86 | rb.Push(ResultSuccess); | ||
| 87 | } | ||
| 81 | }; | 88 | }; |
| 82 | 89 | ||
| 83 | // 3.0.0+ | 90 | // 3.0.0+ |
| @@ -837,6 +844,29 @@ void Module::Interface::InitializeApplicationInfoV2(HLERequestContext& ctx) { | |||
| 837 | rb.Push(ResultSuccess); | 844 | rb.Push(ResultSuccess); |
| 838 | } | 845 | } |
| 839 | 846 | ||
| 847 | void Module::Interface::BeginUserRegistration(HLERequestContext& ctx) { | ||
| 848 | const auto user_id = Common::UUID::MakeRandom(); | ||
| 849 | profile_manager->CreateNewUser(user_id, "yuzu"); | ||
| 850 | |||
| 851 | LOG_INFO(Service_ACC, "called, uuid={}", user_id.FormattedString()); | ||
| 852 | |||
| 853 | IPC::ResponseBuilder rb{ctx, 6}; | ||
| 854 | rb.Push(ResultSuccess); | ||
| 855 | rb.PushRaw(user_id); | ||
| 856 | } | ||
| 857 | |||
| 858 | void Module::Interface::CompleteUserRegistration(HLERequestContext& ctx) { | ||
| 859 | IPC::RequestParser rp{ctx}; | ||
| 860 | Common::UUID user_id = rp.PopRaw<Common::UUID>(); | ||
| 861 | |||
| 862 | LOG_INFO(Service_ACC, "called, uuid={}", user_id.FormattedString()); | ||
| 863 | |||
| 864 | profile_manager->WriteUserSaveFile(); | ||
| 865 | |||
| 866 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 867 | rb.Push(ResultSuccess); | ||
| 868 | } | ||
| 869 | |||
| 840 | void Module::Interface::GetProfileEditor(HLERequestContext& ctx) { | 870 | void Module::Interface::GetProfileEditor(HLERequestContext& ctx) { |
| 841 | IPC::RequestParser rp{ctx}; | 871 | IPC::RequestParser rp{ctx}; |
| 842 | Common::UUID user_id = rp.PopRaw<Common::UUID>(); | 872 | Common::UUID user_id = rp.PopRaw<Common::UUID>(); |
| @@ -880,6 +910,17 @@ void Module::Interface::StoreSaveDataThumbnailApplication(HLERequestContext& ctx | |||
| 880 | StoreSaveDataThumbnail(ctx, uuid, tid); | 910 | StoreSaveDataThumbnail(ctx, uuid, tid); |
| 881 | } | 911 | } |
| 882 | 912 | ||
| 913 | void Module::Interface::GetBaasAccountManagerForSystemService(HLERequestContext& ctx) { | ||
| 914 | IPC::RequestParser rp{ctx}; | ||
| 915 | const auto uuid = rp.PopRaw<Common::UUID>(); | ||
| 916 | |||
| 917 | LOG_INFO(Service_ACC, "called, uuid=0x{}", uuid.RawString()); | ||
| 918 | |||
| 919 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 920 | rb.Push(ResultSuccess); | ||
| 921 | rb.PushIpcInterface<IManagerForSystemService>(system, uuid); | ||
| 922 | } | ||
| 923 | |||
| 883 | void Module::Interface::StoreSaveDataThumbnailSystem(HLERequestContext& ctx) { | 924 | void Module::Interface::StoreSaveDataThumbnailSystem(HLERequestContext& ctx) { |
| 884 | IPC::RequestParser rp{ctx}; | 925 | IPC::RequestParser rp{ctx}; |
| 885 | const auto uuid = rp.PopRaw<Common::UUID>(); | 926 | const auto uuid = rp.PopRaw<Common::UUID>(); |
diff --git a/src/core/hle/service/acc/acc.h b/src/core/hle/service/acc/acc.h index 6b4735c2f..0395229b4 100644 --- a/src/core/hle/service/acc/acc.h +++ b/src/core/hle/service/acc/acc.h | |||
| @@ -33,10 +33,13 @@ public: | |||
| 33 | void TrySelectUserWithoutInteraction(HLERequestContext& ctx); | 33 | void TrySelectUserWithoutInteraction(HLERequestContext& ctx); |
| 34 | void IsUserAccountSwitchLocked(HLERequestContext& ctx); | 34 | void IsUserAccountSwitchLocked(HLERequestContext& ctx); |
| 35 | void InitializeApplicationInfoV2(HLERequestContext& ctx); | 35 | void InitializeApplicationInfoV2(HLERequestContext& ctx); |
| 36 | void BeginUserRegistration(HLERequestContext& ctx); | ||
| 37 | void CompleteUserRegistration(HLERequestContext& ctx); | ||
| 36 | void GetProfileEditor(HLERequestContext& ctx); | 38 | void GetProfileEditor(HLERequestContext& ctx); |
| 37 | void ListQualifiedUsers(HLERequestContext& ctx); | 39 | void ListQualifiedUsers(HLERequestContext& ctx); |
| 38 | void ListOpenContextStoredUsers(HLERequestContext& ctx); | 40 | void ListOpenContextStoredUsers(HLERequestContext& ctx); |
| 39 | void StoreSaveDataThumbnailApplication(HLERequestContext& ctx); | 41 | void StoreSaveDataThumbnailApplication(HLERequestContext& ctx); |
| 42 | void GetBaasAccountManagerForSystemService(HLERequestContext& ctx); | ||
| 40 | void StoreSaveDataThumbnailSystem(HLERequestContext& ctx); | 43 | void StoreSaveDataThumbnailSystem(HLERequestContext& ctx); |
| 41 | 44 | ||
| 42 | private: | 45 | private: |
diff --git a/src/core/hle/service/acc/acc_su.cpp b/src/core/hle/service/acc/acc_su.cpp index d9882ecd3..770d13ec5 100644 --- a/src/core/hle/service/acc/acc_su.cpp +++ b/src/core/hle/service/acc/acc_su.cpp | |||
| @@ -23,7 +23,7 @@ ACC_SU::ACC_SU(std::shared_ptr<Module> module_, std::shared_ptr<ProfileManager> | |||
| 23 | {99, nullptr, "DebugActivateOpenContextRetention"}, | 23 | {99, nullptr, "DebugActivateOpenContextRetention"}, |
| 24 | {100, nullptr, "GetUserRegistrationNotifier"}, | 24 | {100, nullptr, "GetUserRegistrationNotifier"}, |
| 25 | {101, nullptr, "GetUserStateChangeNotifier"}, | 25 | {101, nullptr, "GetUserStateChangeNotifier"}, |
| 26 | {102, nullptr, "GetBaasAccountManagerForSystemService"}, | 26 | {102, &ACC_SU::GetBaasAccountManagerForSystemService, "GetBaasAccountManagerForSystemService"}, |
| 27 | {103, nullptr, "GetBaasUserAvailabilityChangeNotifier"}, | 27 | {103, nullptr, "GetBaasUserAvailabilityChangeNotifier"}, |
| 28 | {104, nullptr, "GetProfileUpdateNotifier"}, | 28 | {104, nullptr, "GetProfileUpdateNotifier"}, |
| 29 | {105, nullptr, "CheckNetworkServiceAvailabilityAsync"}, | 29 | {105, nullptr, "CheckNetworkServiceAvailabilityAsync"}, |
| @@ -40,8 +40,8 @@ ACC_SU::ACC_SU(std::shared_ptr<Module> module_, std::shared_ptr<ProfileManager> | |||
| 40 | {152, nullptr, "LoadSignedDeviceIdentifierCacheForNintendoAccount"}, | 40 | {152, nullptr, "LoadSignedDeviceIdentifierCacheForNintendoAccount"}, |
| 41 | {190, nullptr, "GetUserLastOpenedApplication"}, | 41 | {190, nullptr, "GetUserLastOpenedApplication"}, |
| 42 | {191, nullptr, "ActivateOpenContextHolder"}, | 42 | {191, nullptr, "ActivateOpenContextHolder"}, |
| 43 | {200, nullptr, "BeginUserRegistration"}, | 43 | {200, &ACC_SU::BeginUserRegistration, "BeginUserRegistration"}, |
| 44 | {201, nullptr, "CompleteUserRegistration"}, | 44 | {201, &ACC_SU::CompleteUserRegistration, "CompleteUserRegistration"}, |
| 45 | {202, nullptr, "CancelUserRegistration"}, | 45 | {202, nullptr, "CancelUserRegistration"}, |
| 46 | {203, nullptr, "DeleteUser"}, | 46 | {203, nullptr, "DeleteUser"}, |
| 47 | {204, nullptr, "SetUserPosition"}, | 47 | {204, nullptr, "SetUserPosition"}, |
diff --git a/src/core/hle/service/acc/profile_manager.h b/src/core/hle/service/acc/profile_manager.h index 993a5a57a..900e32200 100644 --- a/src/core/hle/service/acc/profile_manager.h +++ b/src/core/hle/service/acc/profile_manager.h | |||
| @@ -96,9 +96,10 @@ public: | |||
| 96 | bool SetProfileBaseAndData(Common::UUID uuid, const ProfileBase& profile_new, | 96 | bool SetProfileBaseAndData(Common::UUID uuid, const ProfileBase& profile_new, |
| 97 | const UserData& data_new); | 97 | const UserData& data_new); |
| 98 | 98 | ||
| 99 | void WriteUserSaveFile(); | ||
| 100 | |||
| 99 | private: | 101 | private: |
| 100 | void ParseUserSaveFile(); | 102 | void ParseUserSaveFile(); |
| 101 | void WriteUserSaveFile(); | ||
| 102 | std::optional<std::size_t> AddToProfiles(const ProfileInfo& profile); | 103 | std::optional<std::size_t> AddToProfiles(const ProfileInfo& profile); |
| 103 | bool RemoveProfileAtIndex(std::size_t index); | 104 | bool RemoveProfileAtIndex(std::size_t index); |
| 104 | 105 | ||
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index ac376b55a..98765b81a 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp | |||
| @@ -210,8 +210,8 @@ IDisplayController::IDisplayController(Core::System& system_) | |||
| 210 | {21, nullptr, "ClearAppletTransitionBuffer"}, | 210 | {21, nullptr, "ClearAppletTransitionBuffer"}, |
| 211 | {22, nullptr, "AcquireLastApplicationCaptureSharedBuffer"}, | 211 | {22, nullptr, "AcquireLastApplicationCaptureSharedBuffer"}, |
| 212 | {23, nullptr, "ReleaseLastApplicationCaptureSharedBuffer"}, | 212 | {23, nullptr, "ReleaseLastApplicationCaptureSharedBuffer"}, |
| 213 | {24, nullptr, "AcquireLastForegroundCaptureSharedBuffer"}, | 213 | {24, &IDisplayController::AcquireLastForegroundCaptureSharedBuffer, "AcquireLastForegroundCaptureSharedBuffer"}, |
| 214 | {25, nullptr, "ReleaseLastForegroundCaptureSharedBuffer"}, | 214 | {25, &IDisplayController::ReleaseLastForegroundCaptureSharedBuffer, "ReleaseLastForegroundCaptureSharedBuffer"}, |
| 215 | {26, &IDisplayController::AcquireCallerAppletCaptureSharedBuffer, "AcquireCallerAppletCaptureSharedBuffer"}, | 215 | {26, &IDisplayController::AcquireCallerAppletCaptureSharedBuffer, "AcquireCallerAppletCaptureSharedBuffer"}, |
| 216 | {27, &IDisplayController::ReleaseCallerAppletCaptureSharedBuffer, "ReleaseCallerAppletCaptureSharedBuffer"}, | 216 | {27, &IDisplayController::ReleaseCallerAppletCaptureSharedBuffer, "ReleaseCallerAppletCaptureSharedBuffer"}, |
| 217 | {28, nullptr, "TakeScreenShotOfOwnLayerEx"}, | 217 | {28, nullptr, "TakeScreenShotOfOwnLayerEx"}, |
| @@ -239,6 +239,22 @@ void IDisplayController::TakeScreenShotOfOwnLayer(HLERequestContext& ctx) { | |||
| 239 | rb.Push(ResultSuccess); | 239 | rb.Push(ResultSuccess); |
| 240 | } | 240 | } |
| 241 | 241 | ||
| 242 | void IDisplayController::AcquireLastForegroundCaptureSharedBuffer(HLERequestContext& ctx) { | ||
| 243 | LOG_WARNING(Service_AM, "(STUBBED) called"); | ||
| 244 | |||
| 245 | IPC::ResponseBuilder rb{ctx, 4}; | ||
| 246 | rb.Push(ResultSuccess); | ||
| 247 | rb.Push(1U); | ||
| 248 | rb.Push(0); | ||
| 249 | } | ||
| 250 | |||
| 251 | void IDisplayController::ReleaseLastForegroundCaptureSharedBuffer(HLERequestContext& ctx) { | ||
| 252 | LOG_WARNING(Service_AM, "(STUBBED) called"); | ||
| 253 | |||
| 254 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 255 | rb.Push(ResultSuccess); | ||
| 256 | } | ||
| 257 | |||
| 242 | void IDisplayController::AcquireCallerAppletCaptureSharedBuffer(HLERequestContext& ctx) { | 258 | void IDisplayController::AcquireCallerAppletCaptureSharedBuffer(HLERequestContext& ctx) { |
| 243 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 259 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 244 | 260 | ||
| @@ -1557,7 +1573,7 @@ ILibraryAppletSelfAccessor::ILibraryAppletSelfAccessor(Core::System& system_) | |||
| 1557 | {100, nullptr, "CreateGameMovieTrimmer"}, | 1573 | {100, nullptr, "CreateGameMovieTrimmer"}, |
| 1558 | {101, nullptr, "ReserveResourceForMovieOperation"}, | 1574 | {101, nullptr, "ReserveResourceForMovieOperation"}, |
| 1559 | {102, nullptr, "UnreserveResourceForMovieOperation"}, | 1575 | {102, nullptr, "UnreserveResourceForMovieOperation"}, |
| 1560 | {110, nullptr, "GetMainAppletAvailableUsers"}, | 1576 | {110, &ILibraryAppletSelfAccessor::GetMainAppletAvailableUsers, "GetMainAppletAvailableUsers"}, |
| 1561 | {120, nullptr, "GetLaunchStorageInfoForDebug"}, | 1577 | {120, nullptr, "GetLaunchStorageInfoForDebug"}, |
| 1562 | {130, nullptr, "GetGpuErrorDetectedSystemEvent"}, | 1578 | {130, nullptr, "GetGpuErrorDetectedSystemEvent"}, |
| 1563 | {140, nullptr, "SetApplicationMemoryReservation"}, | 1579 | {140, nullptr, "SetApplicationMemoryReservation"}, |
| @@ -1652,6 +1668,25 @@ void ILibraryAppletSelfAccessor::GetCallerAppletIdentityInfo(HLERequestContext& | |||
| 1652 | rb.PushRaw(applet_info); | 1668 | rb.PushRaw(applet_info); |
| 1653 | } | 1669 | } |
| 1654 | 1670 | ||
| 1671 | void ILibraryAppletSelfAccessor::GetMainAppletAvailableUsers(HLERequestContext& ctx) { | ||
| 1672 | const Service::Account::ProfileManager manager{}; | ||
| 1673 | bool is_empty{true}; | ||
| 1674 | s32 user_count{-1}; | ||
| 1675 | |||
| 1676 | LOG_INFO(Service_AM, "called"); | ||
| 1677 | |||
| 1678 | if (manager.GetUserCount() > 0) { | ||
| 1679 | is_empty = false; | ||
| 1680 | user_count = static_cast<s32>(manager.GetUserCount()); | ||
| 1681 | ctx.WriteBuffer(manager.GetAllUsers()); | ||
| 1682 | } | ||
| 1683 | |||
| 1684 | IPC::ResponseBuilder rb{ctx, 4}; | ||
| 1685 | rb.Push(ResultSuccess); | ||
| 1686 | rb.Push<u8>(is_empty); | ||
| 1687 | rb.Push(user_count); | ||
| 1688 | } | ||
| 1689 | |||
| 1655 | void ILibraryAppletSelfAccessor::PushInShowAlbum() { | 1690 | void ILibraryAppletSelfAccessor::PushInShowAlbum() { |
| 1656 | const Applets::CommonArguments arguments{ | 1691 | const Applets::CommonArguments arguments{ |
| 1657 | .arguments_version = Applets::CommonArgumentVersion::Version3, | 1692 | .arguments_version = Applets::CommonArgumentVersion::Version3, |
diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h index 4a045cfd4..64b3f3fe2 100644 --- a/src/core/hle/service/am/am.h +++ b/src/core/hle/service/am/am.h | |||
| @@ -124,6 +124,8 @@ public: | |||
| 124 | private: | 124 | private: |
| 125 | void GetCallerAppletCaptureImageEx(HLERequestContext& ctx); | 125 | void GetCallerAppletCaptureImageEx(HLERequestContext& ctx); |
| 126 | void TakeScreenShotOfOwnLayer(HLERequestContext& ctx); | 126 | void TakeScreenShotOfOwnLayer(HLERequestContext& ctx); |
| 127 | void AcquireLastForegroundCaptureSharedBuffer(HLERequestContext& ctx); | ||
| 128 | void ReleaseLastForegroundCaptureSharedBuffer(HLERequestContext& ctx); | ||
| 127 | void AcquireCallerAppletCaptureSharedBuffer(HLERequestContext& ctx); | 129 | void AcquireCallerAppletCaptureSharedBuffer(HLERequestContext& ctx); |
| 128 | void ReleaseCallerAppletCaptureSharedBuffer(HLERequestContext& ctx); | 130 | void ReleaseCallerAppletCaptureSharedBuffer(HLERequestContext& ctx); |
| 129 | }; | 131 | }; |
| @@ -345,6 +347,7 @@ private: | |||
| 345 | void GetLibraryAppletInfo(HLERequestContext& ctx); | 347 | void GetLibraryAppletInfo(HLERequestContext& ctx); |
| 346 | void ExitProcessAndReturn(HLERequestContext& ctx); | 348 | void ExitProcessAndReturn(HLERequestContext& ctx); |
| 347 | void GetCallerAppletIdentityInfo(HLERequestContext& ctx); | 349 | void GetCallerAppletIdentityInfo(HLERequestContext& ctx); |
| 350 | void GetMainAppletAvailableUsers(HLERequestContext& ctx); | ||
| 348 | 351 | ||
| 349 | void PushInShowAlbum(); | 352 | void PushInShowAlbum(); |
| 350 | void PushInShowCabinetData(); | 353 | void PushInShowCabinetData(); |