diff options
| -rw-r--r-- | src/core/hle/service/friend/friend.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/core/hle/service/friend/friend.cpp b/src/core/hle/service/friend/friend.cpp index 9752f1a8d..a00d7dce7 100644 --- a/src/core/hle/service/friend/friend.cpp +++ b/src/core/hle/service/friend/friend.cpp | |||
| @@ -151,7 +151,7 @@ private: | |||
| 151 | while (!notifications.empty()) { | 151 | while (!notifications.empty()) { |
| 152 | notifications.pop(); | 152 | notifications.pop(); |
| 153 | } | 153 | } |
| 154 | states.has_recieved_friend_request = false; | 154 | states.has_received_friend_request = false; |
| 155 | states.has_updated_friends = false; | 155 | states.has_updated_friends = false; |
| 156 | 156 | ||
| 157 | IPC::ResponseBuilder rb{ctx, 2}; | 157 | IPC::ResponseBuilder rb{ctx, 2}; |
| @@ -160,13 +160,14 @@ private: | |||
| 160 | 160 | ||
| 161 | void Pop(Kernel::HLERequestContext& ctx) { | 161 | void Pop(Kernel::HLERequestContext& ctx) { |
| 162 | LOG_DEBUG(Service_ACC, "called"); | 162 | LOG_DEBUG(Service_ACC, "called"); |
| 163 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 164 | 163 | ||
| 165 | if (notifications.empty()) { | 164 | if (notifications.empty()) { |
| 166 | LOG_ERROR(Service_ACC, "No notifications in queue!"); | 165 | LOG_ERROR(Service_ACC, "No notifications in queue!"); |
| 166 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 167 | rb.Push(ERR_NO_NOTIFICATIONS); | 167 | rb.Push(ERR_NO_NOTIFICATIONS); |
| 168 | return; | 168 | return; |
| 169 | } | 169 | } |
| 170 | IPC::ResponseBuilder rb{ctx, 6}; | ||
| 170 | 171 | ||
| 171 | auto notification = notifications.front(); | 172 | auto notification = notifications.front(); |
| 172 | notifications.pop(); | 173 | notifications.pop(); |
| @@ -175,8 +176,8 @@ private: | |||
| 175 | case NotificationTypes::HasUpdatedFriendsList: | 176 | case NotificationTypes::HasUpdatedFriendsList: |
| 176 | states.has_updated_friends = false; | 177 | states.has_updated_friends = false; |
| 177 | break; | 178 | break; |
| 178 | case NotificationTypes::HasRecievedFriendRequest: | 179 | case NotificationTypes::HasReceivedFriendRequest: |
| 179 | states.has_recieved_friend_request = false; | 180 | states.has_received_friend_request = false; |
| 180 | break; | 181 | break; |
| 181 | default: | 182 | default: |
| 182 | // HOS seems not have an error case for an unknown notification | 183 | // HOS seems not have an error case for an unknown notification |
| @@ -185,11 +186,12 @@ private: | |||
| 185 | break; | 186 | break; |
| 186 | } | 187 | } |
| 187 | rb.Push(RESULT_SUCCESS); | 188 | rb.Push(RESULT_SUCCESS); |
| 189 | rb.PushRaw<SizedNotificationInfo>(notification); | ||
| 188 | } | 190 | } |
| 189 | 191 | ||
| 190 | enum class NotificationTypes : u32_le { | 192 | enum class NotificationTypes : u32_le { |
| 191 | HasUpdatedFriendsList = 0x65, | 193 | HasUpdatedFriendsList = 0x65, |
| 192 | HasRecievedFriendRequest = 0x1 | 194 | HasReceivedFriendRequest = 0x1 |
| 193 | }; | 195 | }; |
| 194 | 196 | ||
| 195 | struct SizedNotificationInfo { | 197 | struct SizedNotificationInfo { |
| @@ -201,7 +203,7 @@ private: | |||
| 201 | 203 | ||
| 202 | struct States { | 204 | struct States { |
| 203 | bool has_updated_friends; | 205 | bool has_updated_friends; |
| 204 | bool has_recieved_friend_request; | 206 | bool has_received_friend_request; |
| 205 | }; | 207 | }; |
| 206 | 208 | ||
| 207 | Common::UUID uuid{}; | 209 | Common::UUID uuid{}; |