From 5d005b87a3494e2d488ef611783a4e177fcfcee9 Mon Sep 17 00:00:00 2001 From: David Marcec Date: Tue, 25 Jun 2019 11:23:23 +1000 Subject: fixed spelling errors and fixed issue with Pop not returning the SizedNotificationInfo --- src/core/hle/service/friend/friend.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/core/hle/service/friend') 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: while (!notifications.empty()) { notifications.pop(); } - states.has_recieved_friend_request = false; + states.has_received_friend_request = false; states.has_updated_friends = false; IPC::ResponseBuilder rb{ctx, 2}; @@ -160,13 +160,14 @@ private: void Pop(Kernel::HLERequestContext& ctx) { LOG_DEBUG(Service_ACC, "called"); - IPC::ResponseBuilder rb{ctx, 2}; if (notifications.empty()) { LOG_ERROR(Service_ACC, "No notifications in queue!"); + IPC::ResponseBuilder rb{ctx, 2}; rb.Push(ERR_NO_NOTIFICATIONS); return; } + IPC::ResponseBuilder rb{ctx, 6}; auto notification = notifications.front(); notifications.pop(); @@ -175,8 +176,8 @@ private: case NotificationTypes::HasUpdatedFriendsList: states.has_updated_friends = false; break; - case NotificationTypes::HasRecievedFriendRequest: - states.has_recieved_friend_request = false; + case NotificationTypes::HasReceivedFriendRequest: + states.has_received_friend_request = false; break; default: // HOS seems not have an error case for an unknown notification @@ -185,11 +186,12 @@ private: break; } rb.Push(RESULT_SUCCESS); + rb.PushRaw(notification); } enum class NotificationTypes : u32_le { HasUpdatedFriendsList = 0x65, - HasRecievedFriendRequest = 0x1 + HasReceivedFriendRequest = 0x1 }; struct SizedNotificationInfo { @@ -201,7 +203,7 @@ private: struct States { bool has_updated_friends; - bool has_recieved_friend_request; + bool has_received_friend_request; }; Common::UUID uuid{}; -- cgit v1.2.3