mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-12 00:47:49 +00:00
[vk, hle] fix storage buffer cache, unstubbed TryPopFriendInvitation (#129)
This fixes Jamboree + unstubes friend invitation channel which spammed a lot while testing jamboree. Culprit was: #2 Co-authored-by: Maufeat <sahyno1996@gmail.com> Co-authored-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/129 Co-authored-by: Maufeat <maufeat@eden-emu.dev> Co-committed-by: Maufeat <maufeat@eden-emu.dev>
This commit is contained in:
parent
3bcd5f95fe
commit
77a8f7b6a7
4 changed files with 28 additions and 6 deletions
|
@ -92,6 +92,7 @@ struct Applet {
|
|||
// Channels
|
||||
std::deque<std::vector<u8>> user_channel_launch_parameter{};
|
||||
std::deque<std::vector<u8>> preselected_user_launch_parameter{};
|
||||
std::deque<std::vector<u8>> friend_invitation_storage_channel{};
|
||||
|
||||
// Caller applet
|
||||
std::weak_ptr<Applet> caller_applet{};
|
||||
|
|
|
@ -456,8 +456,21 @@ Result IApplicationFunctions::GetFriendInvitationStorageChannelEvent(
|
|||
|
||||
Result IApplicationFunctions::TryPopFromFriendInvitationStorageChannel(
|
||||
Out<SharedPointer<IStorage>> out_storage) {
|
||||
LOG_INFO(Service_AM, "(STUBBED) called");
|
||||
R_THROW(AM::ResultNoDataInChannel);
|
||||
LOG_DEBUG(Service_AM, "called");
|
||||
|
||||
std::scoped_lock lk{m_applet->lock};
|
||||
|
||||
auto& channel = m_applet->friend_invitation_storage_channel;
|
||||
|
||||
if (channel.empty()) {
|
||||
return AM::ResultNoDataInChannel;
|
||||
}
|
||||
|
||||
auto data = channel.back();
|
||||
channel.pop_back();
|
||||
|
||||
*out_storage = std::make_shared<IStorage>(system, std::move(data));
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result IApplicationFunctions::GetNotificationStorageChannelEvent(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue