diff options
| author | 2022-07-17 12:30:52 -0700 | |
|---|---|---|
| committer | 2022-07-17 12:30:52 -0700 | |
| commit | a5bdf824e66d23a16af6a1b43256415570b1a8b3 (patch) | |
| tree | 7513f9013bd6295ace422655214d633273f38c8f | |
| parent | Merge pull request #8525 from lat9nq/update-sdl (diff) | |
| parent | service: fatal: Add function table (diff) | |
| download | yuzu-a5bdf824e66d23a16af6a1b43256415570b1a8b3.tar.gz yuzu-a5bdf824e66d23a16af6a1b43256415570b1a8b3.tar.xz yuzu-a5bdf824e66d23a16af6a1b43256415570b1a8b3.zip | |
Merge pull request #8544 from german77/14dot0
service: Update some services to 14.0.0+
Diffstat (limited to '')
| -rw-r--r-- | src/core/hle/service/acc/acc.cpp | 20 | ||||
| -rw-r--r-- | src/core/hle/service/acc/profile_manager.cpp | 11 | ||||
| -rw-r--r-- | src/core/hle/service/acc/profile_manager.h | 15 | ||||
| -rw-r--r-- | src/core/hle/service/am/am.cpp | 3 | ||||
| -rw-r--r-- | src/core/hle/service/bcat/bcat_module.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/btdrv/btdrv.cpp | 5 | ||||
| -rw-r--r-- | src/core/hle/service/btm/btm.cpp | 8 | ||||
| -rw-r--r-- | src/core/hle/service/fatal/fatal_p.cpp | 8 |
8 files changed, 45 insertions, 29 deletions
diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index b726ac27a..def105832 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp | |||
| @@ -290,7 +290,7 @@ protected: | |||
| 290 | void Get(Kernel::HLERequestContext& ctx) { | 290 | void Get(Kernel::HLERequestContext& ctx) { |
| 291 | LOG_DEBUG(Service_ACC, "called user_id=0x{}", user_id.RawString()); | 291 | LOG_DEBUG(Service_ACC, "called user_id=0x{}", user_id.RawString()); |
| 292 | ProfileBase profile_base{}; | 292 | ProfileBase profile_base{}; |
| 293 | ProfileData data{}; | 293 | UserData data{}; |
| 294 | if (profile_manager.GetProfileBaseAndData(user_id, profile_base, data)) { | 294 | if (profile_manager.GetProfileBaseAndData(user_id, profile_base, data)) { |
| 295 | ctx.WriteBuffer(data); | 295 | ctx.WriteBuffer(data); |
| 296 | IPC::ResponseBuilder rb{ctx, 16}; | 296 | IPC::ResponseBuilder rb{ctx, 16}; |
| @@ -373,18 +373,18 @@ protected: | |||
| 373 | reinterpret_cast<const char*>(base.username.data()), base.username.size()), | 373 | reinterpret_cast<const char*>(base.username.data()), base.username.size()), |
| 374 | base.timestamp, base.user_uuid.RawString()); | 374 | base.timestamp, base.user_uuid.RawString()); |
| 375 | 375 | ||
| 376 | if (user_data.size() < sizeof(ProfileData)) { | 376 | if (user_data.size() < sizeof(UserData)) { |
| 377 | LOG_ERROR(Service_ACC, "ProfileData buffer too small!"); | 377 | LOG_ERROR(Service_ACC, "UserData buffer too small!"); |
| 378 | IPC::ResponseBuilder rb{ctx, 2}; | 378 | IPC::ResponseBuilder rb{ctx, 2}; |
| 379 | rb.Push(ERR_INVALID_BUFFER); | 379 | rb.Push(ERR_INVALID_BUFFER); |
| 380 | return; | 380 | return; |
| 381 | } | 381 | } |
| 382 | 382 | ||
| 383 | ProfileData data; | 383 | UserData data; |
| 384 | std::memcpy(&data, user_data.data(), sizeof(ProfileData)); | 384 | std::memcpy(&data, user_data.data(), sizeof(UserData)); |
| 385 | 385 | ||
| 386 | if (!profile_manager.SetProfileBaseAndData(user_id, base, data)) { | 386 | if (!profile_manager.SetProfileBaseAndData(user_id, base, data)) { |
| 387 | LOG_ERROR(Service_ACC, "Failed to update profile data and base!"); | 387 | LOG_ERROR(Service_ACC, "Failed to update user data and base!"); |
| 388 | IPC::ResponseBuilder rb{ctx, 2}; | 388 | IPC::ResponseBuilder rb{ctx, 2}; |
| 389 | rb.Push(ERR_FAILED_SAVE_DATA); | 389 | rb.Push(ERR_FAILED_SAVE_DATA); |
| 390 | return; | 390 | return; |
| @@ -406,15 +406,15 @@ protected: | |||
| 406 | reinterpret_cast<const char*>(base.username.data()), base.username.size()), | 406 | reinterpret_cast<const char*>(base.username.data()), base.username.size()), |
| 407 | base.timestamp, base.user_uuid.RawString()); | 407 | base.timestamp, base.user_uuid.RawString()); |
| 408 | 408 | ||
| 409 | if (user_data.size() < sizeof(ProfileData)) { | 409 | if (user_data.size() < sizeof(UserData)) { |
| 410 | LOG_ERROR(Service_ACC, "ProfileData buffer too small!"); | 410 | LOG_ERROR(Service_ACC, "UserData buffer too small!"); |
| 411 | IPC::ResponseBuilder rb{ctx, 2}; | 411 | IPC::ResponseBuilder rb{ctx, 2}; |
| 412 | rb.Push(ERR_INVALID_BUFFER); | 412 | rb.Push(ERR_INVALID_BUFFER); |
| 413 | return; | 413 | return; |
| 414 | } | 414 | } |
| 415 | 415 | ||
| 416 | ProfileData data; | 416 | UserData data; |
| 417 | std::memcpy(&data, user_data.data(), sizeof(ProfileData)); | 417 | std::memcpy(&data, user_data.data(), sizeof(UserData)); |
| 418 | 418 | ||
| 419 | Common::FS::IOFile image(GetImagePath(user_id), Common::FS::FileAccessMode::Write, | 419 | Common::FS::IOFile image(GetImagePath(user_id), Common::FS::FileAccessMode::Write, |
| 420 | Common::FS::FileType::BinaryFile); | 420 | Common::FS::FileType::BinaryFile); |
diff --git a/src/core/hle/service/acc/profile_manager.cpp b/src/core/hle/service/acc/profile_manager.cpp index 8118ead33..a58da4d5f 100644 --- a/src/core/hle/service/acc/profile_manager.cpp +++ b/src/core/hle/service/acc/profile_manager.cpp | |||
| @@ -22,7 +22,7 @@ struct UserRaw { | |||
| 22 | UUID uuid2{}; | 22 | UUID uuid2{}; |
| 23 | u64 timestamp{}; | 23 | u64 timestamp{}; |
| 24 | ProfileUsername username{}; | 24 | ProfileUsername username{}; |
| 25 | ProfileData extra_data{}; | 25 | UserData extra_data{}; |
| 26 | }; | 26 | }; |
| 27 | static_assert(sizeof(UserRaw) == 0xC8, "UserRaw has incorrect size."); | 27 | static_assert(sizeof(UserRaw) == 0xC8, "UserRaw has incorrect size."); |
| 28 | 28 | ||
| @@ -263,7 +263,7 @@ UUID ProfileManager::GetLastOpenedUser() const { | |||
| 263 | 263 | ||
| 264 | /// Return the users profile base and the unknown arbitary data. | 264 | /// Return the users profile base and the unknown arbitary data. |
| 265 | bool ProfileManager::GetProfileBaseAndData(std::optional<std::size_t> index, ProfileBase& profile, | 265 | bool ProfileManager::GetProfileBaseAndData(std::optional<std::size_t> index, ProfileBase& profile, |
| 266 | ProfileData& data) const { | 266 | UserData& data) const { |
| 267 | if (GetProfileBase(index, profile)) { | 267 | if (GetProfileBase(index, profile)) { |
| 268 | data = profiles[*index].data; | 268 | data = profiles[*index].data; |
| 269 | return true; | 269 | return true; |
| @@ -272,15 +272,14 @@ bool ProfileManager::GetProfileBaseAndData(std::optional<std::size_t> index, Pro | |||
| 272 | } | 272 | } |
| 273 | 273 | ||
| 274 | /// Return the users profile base and the unknown arbitary data. | 274 | /// Return the users profile base and the unknown arbitary data. |
| 275 | bool ProfileManager::GetProfileBaseAndData(UUID uuid, ProfileBase& profile, | 275 | bool ProfileManager::GetProfileBaseAndData(UUID uuid, ProfileBase& profile, UserData& data) const { |
| 276 | ProfileData& data) const { | ||
| 277 | const auto idx = GetUserIndex(uuid); | 276 | const auto idx = GetUserIndex(uuid); |
| 278 | return GetProfileBaseAndData(idx, profile, data); | 277 | return GetProfileBaseAndData(idx, profile, data); |
| 279 | } | 278 | } |
| 280 | 279 | ||
| 281 | /// Return the users profile base and the unknown arbitary data. | 280 | /// Return the users profile base and the unknown arbitary data. |
| 282 | bool ProfileManager::GetProfileBaseAndData(const ProfileInfo& user, ProfileBase& profile, | 281 | bool ProfileManager::GetProfileBaseAndData(const ProfileInfo& user, ProfileBase& profile, |
| 283 | ProfileData& data) const { | 282 | UserData& data) const { |
| 284 | return GetProfileBaseAndData(user.user_uuid, profile, data); | 283 | return GetProfileBaseAndData(user.user_uuid, profile, data); |
| 285 | } | 284 | } |
| 286 | 285 | ||
| @@ -318,7 +317,7 @@ bool ProfileManager::SetProfileBase(UUID uuid, const ProfileBase& profile_new) { | |||
| 318 | } | 317 | } |
| 319 | 318 | ||
| 320 | bool ProfileManager::SetProfileBaseAndData(Common::UUID uuid, const ProfileBase& profile_new, | 319 | bool ProfileManager::SetProfileBaseAndData(Common::UUID uuid, const ProfileBase& profile_new, |
| 321 | const ProfileData& data_new) { | 320 | const UserData& data_new) { |
| 322 | const auto index = GetUserIndex(uuid); | 321 | const auto index = GetUserIndex(uuid); |
| 323 | if (index.has_value() && SetProfileBase(uuid, profile_new)) { | 322 | if (index.has_value() && SetProfileBase(uuid, profile_new)) { |
| 324 | profiles[*index].data = data_new; | 323 | profiles[*index].data = data_new; |
diff --git a/src/core/hle/service/acc/profile_manager.h b/src/core/hle/service/acc/profile_manager.h index 9940957f1..135f7d0d5 100644 --- a/src/core/hle/service/acc/profile_manager.h +++ b/src/core/hle/service/acc/profile_manager.h | |||
| @@ -22,7 +22,7 @@ using UserIDArray = std::array<Common::UUID, MAX_USERS>; | |||
| 22 | 22 | ||
| 23 | /// Contains extra data related to a user. | 23 | /// Contains extra data related to a user. |
| 24 | /// TODO: RE this structure | 24 | /// TODO: RE this structure |
| 25 | struct ProfileData { | 25 | struct UserData { |
| 26 | INSERT_PADDING_WORDS_NOINIT(1); | 26 | INSERT_PADDING_WORDS_NOINIT(1); |
| 27 | u32 icon_id; | 27 | u32 icon_id; |
| 28 | u8 bg_color_id; | 28 | u8 bg_color_id; |
| @@ -30,7 +30,7 @@ struct ProfileData { | |||
| 30 | INSERT_PADDING_BYTES_NOINIT(0x10); | 30 | INSERT_PADDING_BYTES_NOINIT(0x10); |
| 31 | INSERT_PADDING_BYTES_NOINIT(0x60); | 31 | INSERT_PADDING_BYTES_NOINIT(0x60); |
| 32 | }; | 32 | }; |
| 33 | static_assert(sizeof(ProfileData) == 0x80, "ProfileData structure has incorrect size"); | 33 | static_assert(sizeof(UserData) == 0x80, "UserData structure has incorrect size"); |
| 34 | 34 | ||
| 35 | /// This holds general information about a users profile. This is where we store all the information | 35 | /// This holds general information about a users profile. This is where we store all the information |
| 36 | /// based on a specific user | 36 | /// based on a specific user |
| @@ -38,7 +38,7 @@ struct ProfileInfo { | |||
| 38 | Common::UUID user_uuid{}; | 38 | Common::UUID user_uuid{}; |
| 39 | ProfileUsername username{}; | 39 | ProfileUsername username{}; |
| 40 | u64 creation_time{}; | 40 | u64 creation_time{}; |
| 41 | ProfileData data{}; // TODO(ognik): Work out what this is | 41 | UserData data{}; // TODO(ognik): Work out what this is |
| 42 | bool is_open{}; | 42 | bool is_open{}; |
| 43 | }; | 43 | }; |
| 44 | 44 | ||
| @@ -74,10 +74,9 @@ public: | |||
| 74 | bool GetProfileBase(Common::UUID uuid, ProfileBase& profile) const; | 74 | bool GetProfileBase(Common::UUID uuid, ProfileBase& profile) const; |
| 75 | bool GetProfileBase(const ProfileInfo& user, ProfileBase& profile) const; | 75 | bool GetProfileBase(const ProfileInfo& user, ProfileBase& profile) const; |
| 76 | bool GetProfileBaseAndData(std::optional<std::size_t> index, ProfileBase& profile, | 76 | bool GetProfileBaseAndData(std::optional<std::size_t> index, ProfileBase& profile, |
| 77 | ProfileData& data) const; | 77 | UserData& data) const; |
| 78 | bool GetProfileBaseAndData(Common::UUID uuid, ProfileBase& profile, ProfileData& data) const; | 78 | bool GetProfileBaseAndData(Common::UUID uuid, ProfileBase& profile, UserData& data) const; |
| 79 | bool GetProfileBaseAndData(const ProfileInfo& user, ProfileBase& profile, | 79 | bool GetProfileBaseAndData(const ProfileInfo& user, ProfileBase& profile, UserData& data) const; |
| 80 | ProfileData& data) const; | ||
| 81 | std::size_t GetUserCount() const; | 80 | std::size_t GetUserCount() const; |
| 82 | std::size_t GetOpenUserCount() const; | 81 | std::size_t GetOpenUserCount() const; |
| 83 | bool UserExists(Common::UUID uuid) const; | 82 | bool UserExists(Common::UUID uuid) const; |
| @@ -93,7 +92,7 @@ public: | |||
| 93 | bool RemoveUser(Common::UUID uuid); | 92 | bool RemoveUser(Common::UUID uuid); |
| 94 | bool SetProfileBase(Common::UUID uuid, const ProfileBase& profile_new); | 93 | bool SetProfileBase(Common::UUID uuid, const ProfileBase& profile_new); |
| 95 | bool SetProfileBaseAndData(Common::UUID uuid, const ProfileBase& profile_new, | 94 | bool SetProfileBaseAndData(Common::UUID uuid, const ProfileBase& profile_new, |
| 96 | const ProfileData& data_new); | 95 | const UserData& data_new); |
| 97 | 96 | ||
| 98 | private: | 97 | private: |
| 99 | void ParseUserSaveFile(); | 98 | void ParseUserSaveFile(); |
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index d35644e73..9c62ebc60 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp | |||
| @@ -238,6 +238,7 @@ IDebugFunctions::IDebugFunctions(Core::System& system_) | |||
| 238 | {130, nullptr, "FriendInvitationSetApplicationParameter"}, | 238 | {130, nullptr, "FriendInvitationSetApplicationParameter"}, |
| 239 | {131, nullptr, "FriendInvitationClearApplicationParameter"}, | 239 | {131, nullptr, "FriendInvitationClearApplicationParameter"}, |
| 240 | {132, nullptr, "FriendInvitationPushApplicationParameter"}, | 240 | {132, nullptr, "FriendInvitationPushApplicationParameter"}, |
| 241 | {140, nullptr, "RestrictPowerOperationForSecureLaunchModeForDebug"}, | ||
| 241 | {900, nullptr, "GetGrcProcessLaunchedSystemEvent"}, | 242 | {900, nullptr, "GetGrcProcessLaunchedSystemEvent"}, |
| 242 | }; | 243 | }; |
| 243 | // clang-format on | 244 | // clang-format on |
| @@ -1310,6 +1311,8 @@ IApplicationFunctions::IApplicationFunctions(Core::System& system_) | |||
| 1310 | {33, &IApplicationFunctions::EndBlockingHomeButton, "EndBlockingHomeButton"}, | 1311 | {33, &IApplicationFunctions::EndBlockingHomeButton, "EndBlockingHomeButton"}, |
| 1311 | {34, nullptr, "SelectApplicationLicense"}, | 1312 | {34, nullptr, "SelectApplicationLicense"}, |
| 1312 | {35, nullptr, "GetDeviceSaveDataSizeMax"}, | 1313 | {35, nullptr, "GetDeviceSaveDataSizeMax"}, |
| 1314 | {36, nullptr, "GetLimitedApplicationLicense"}, | ||
| 1315 | {37, nullptr, "GetLimitedApplicationLicenseUpgradableEvent"}, | ||
| 1313 | {40, &IApplicationFunctions::NotifyRunning, "NotifyRunning"}, | 1316 | {40, &IApplicationFunctions::NotifyRunning, "NotifyRunning"}, |
| 1314 | {50, &IApplicationFunctions::GetPseudoDeviceId, "GetPseudoDeviceId"}, | 1317 | {50, &IApplicationFunctions::GetPseudoDeviceId, "GetPseudoDeviceId"}, |
| 1315 | {60, nullptr, "SetMediaPlaybackStateForApplication"}, | 1318 | {60, nullptr, "SetMediaPlaybackStateForApplication"}, |
diff --git a/src/core/hle/service/bcat/bcat_module.cpp b/src/core/hle/service/bcat/bcat_module.cpp index d928e37fb..bc08ac487 100644 --- a/src/core/hle/service/bcat/bcat_module.cpp +++ b/src/core/hle/service/bcat/bcat_module.cpp | |||
| @@ -140,8 +140,8 @@ public: | |||
| 140 | {20401, nullptr, "UnregisterSystemApplicationDeliveryTask"}, | 140 | {20401, nullptr, "UnregisterSystemApplicationDeliveryTask"}, |
| 141 | {20410, nullptr, "SetSystemApplicationDeliveryTaskTimer"}, | 141 | {20410, nullptr, "SetSystemApplicationDeliveryTaskTimer"}, |
| 142 | {30100, &IBcatService::SetPassphrase, "SetPassphrase"}, | 142 | {30100, &IBcatService::SetPassphrase, "SetPassphrase"}, |
| 143 | {30101, nullptr, "Unknown"}, | 143 | {30101, nullptr, "Unknown30101"}, |
| 144 | {30102, nullptr, "Unknown2"}, | 144 | {30102, nullptr, "Unknown30102"}, |
| 145 | {30200, nullptr, "RegisterBackgroundDeliveryTask"}, | 145 | {30200, nullptr, "RegisterBackgroundDeliveryTask"}, |
| 146 | {30201, nullptr, "UnregisterBackgroundDeliveryTask"}, | 146 | {30201, nullptr, "UnregisterBackgroundDeliveryTask"}, |
| 147 | {30202, nullptr, "BlockDeliveryTask"}, | 147 | {30202, nullptr, "BlockDeliveryTask"}, |
diff --git a/src/core/hle/service/btdrv/btdrv.cpp b/src/core/hle/service/btdrv/btdrv.cpp index f9ee2b624..ec7e5320c 100644 --- a/src/core/hle/service/btdrv/btdrv.cpp +++ b/src/core/hle/service/btdrv/btdrv.cpp | |||
| @@ -181,6 +181,11 @@ public: | |||
| 181 | {147, nullptr, "RegisterAudioControlNotification"}, | 181 | {147, nullptr, "RegisterAudioControlNotification"}, |
| 182 | {148, nullptr, "SendAudioControlPassthroughCommand"}, | 182 | {148, nullptr, "SendAudioControlPassthroughCommand"}, |
| 183 | {149, nullptr, "SendAudioControlSetAbsoluteVolumeCommand"}, | 183 | {149, nullptr, "SendAudioControlSetAbsoluteVolumeCommand"}, |
| 184 | {150, nullptr, "AcquireAudioSinkVolumeLocallyChangedEvent"}, | ||
| 185 | {151, nullptr, "AcquireAudioSinkVolumeUpdateRequestCompletedEvent"}, | ||
| 186 | {152, nullptr, "GetAudioSinkVolume"}, | ||
| 187 | {153, nullptr, "RequestUpdateAudioSinkVolume"}, | ||
| 188 | {154, nullptr, "IsAudioSinkVolumeSupported"}, | ||
| 184 | {256, nullptr, "IsManufacturingMode"}, | 189 | {256, nullptr, "IsManufacturingMode"}, |
| 185 | {257, nullptr, "EmulateBluetoothCrash"}, | 190 | {257, nullptr, "EmulateBluetoothCrash"}, |
| 186 | {258, nullptr, "GetBleChannelMap"}, | 191 | {258, nullptr, "GetBleChannelMap"}, |
diff --git a/src/core/hle/service/btm/btm.cpp b/src/core/hle/service/btm/btm.cpp index 3fa88cbd3..eebf85e03 100644 --- a/src/core/hle/service/btm/btm.cpp +++ b/src/core/hle/service/btm/btm.cpp | |||
| @@ -214,8 +214,12 @@ public: | |||
| 214 | {76, nullptr, "Unknown76"}, | 214 | {76, nullptr, "Unknown76"}, |
| 215 | {100, nullptr, "Unknown100"}, | 215 | {100, nullptr, "Unknown100"}, |
| 216 | {101, nullptr, "Unknown101"}, | 216 | {101, nullptr, "Unknown101"}, |
| 217 | {110, nullptr, "Unknown102"}, | 217 | {110, nullptr, "Unknown110"}, |
| 218 | {111, nullptr, "Unknown103"}, | 218 | {111, nullptr, "Unknown111"}, |
| 219 | {112, nullptr, "Unknown112"}, | ||
| 220 | {113, nullptr, "Unknown113"}, | ||
| 221 | {114, nullptr, "Unknown114"}, | ||
| 222 | {115, nullptr, "Unknown115"}, | ||
| 219 | }; | 223 | }; |
| 220 | // clang-format on | 224 | // clang-format on |
| 221 | 225 | ||
diff --git a/src/core/hle/service/fatal/fatal_p.cpp b/src/core/hle/service/fatal/fatal_p.cpp index 7d35b4208..4a81bb5e2 100644 --- a/src/core/hle/service/fatal/fatal_p.cpp +++ b/src/core/hle/service/fatal/fatal_p.cpp | |||
| @@ -6,7 +6,13 @@ | |||
| 6 | namespace Service::Fatal { | 6 | namespace Service::Fatal { |
| 7 | 7 | ||
| 8 | Fatal_P::Fatal_P(std::shared_ptr<Module> module_, Core::System& system_) | 8 | Fatal_P::Fatal_P(std::shared_ptr<Module> module_, Core::System& system_) |
| 9 | : Interface(std::move(module_), system_, "fatal:p") {} | 9 | : Interface(std::move(module_), system_, "fatal:p") { |
| 10 | static const FunctionInfo functions[] = { | ||
| 11 | {0, nullptr, "GetFatalEvent"}, | ||
| 12 | {10, nullptr, "GetFatalContext"}, | ||
| 13 | }; | ||
| 14 | RegisterHandlers(functions); | ||
| 15 | } | ||
| 10 | 16 | ||
| 11 | Fatal_P::~Fatal_P() = default; | 17 | Fatal_P::~Fatal_P() = default; |
| 12 | 18 | ||