summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar bunnei2020-01-29 22:25:57 -0500
committerGravatar bunnei2020-02-05 23:06:53 -0500
commit3a0c1e79f8266a945df04394f478a3aa598702e5 (patch)
treec52cc318a91a5e34ac44029da0a62ad871120d29 /src/core
parentservices: am: Clear events on PopOutData and PopInteractiveOutData. (diff)
downloadyuzu-3a0c1e79f8266a945df04394f478a3aa598702e5.tar.gz
yuzu-3a0c1e79f8266a945df04394f478a3aa598702e5.tar.xz
yuzu-3a0c1e79f8266a945df04394f478a3aa598702e5.zip
am: Correct IPC object count mismatch.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/service/am/am.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp
index d1495ce18..c1550013a 100644
--- a/src/core/hle/service/am/am.cpp
+++ b/src/core/hle/service/am/am.cpp
@@ -856,17 +856,16 @@ private:
856 void PopOutData(Kernel::HLERequestContext& ctx) { 856 void PopOutData(Kernel::HLERequestContext& ctx) {
857 LOG_DEBUG(Service_AM, "called"); 857 LOG_DEBUG(Service_AM, "called");
858 858
859 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
860
861 const auto storage = applet->GetBroker().PopNormalDataToGame(); 859 const auto storage = applet->GetBroker().PopNormalDataToGame();
862 if (storage == nullptr) { 860 if (storage == nullptr) {
863 LOG_ERROR(Service_AM, 861 LOG_ERROR(Service_AM,
864 "storage is a nullptr. There is no data in the current normal channel"); 862 "storage is a nullptr. There is no data in the current normal channel");
865 863 IPC::ResponseBuilder rb{ctx, 2};
866 rb.Push(ERR_NO_DATA_IN_CHANNEL); 864 rb.Push(ERR_NO_DATA_IN_CHANNEL);
867 return; 865 return;
868 } 866 }
869 867
868 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
870 rb.Push(RESULT_SUCCESS); 869 rb.Push(RESULT_SUCCESS);
871 rb.PushIpcInterface<IStorage>(std::move(*storage)); 870 rb.PushIpcInterface<IStorage>(std::move(*storage));
872 } 871 }
@@ -888,17 +887,16 @@ private:
888 void PopInteractiveOutData(Kernel::HLERequestContext& ctx) { 887 void PopInteractiveOutData(Kernel::HLERequestContext& ctx) {
889 LOG_DEBUG(Service_AM, "called"); 888 LOG_DEBUG(Service_AM, "called");
890 889
891 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
892
893 const auto storage = applet->GetBroker().PopInteractiveDataToGame(); 890 const auto storage = applet->GetBroker().PopInteractiveDataToGame();
894 if (storage == nullptr) { 891 if (storage == nullptr) {
895 LOG_ERROR(Service_AM, 892 LOG_ERROR(Service_AM,
896 "storage is a nullptr. There is no data in the current interactive channel"); 893 "storage is a nullptr. There is no data in the current interactive channel");
897 894 IPC::ResponseBuilder rb{ctx, 2};
898 rb.Push(ERR_NO_DATA_IN_CHANNEL); 895 rb.Push(ERR_NO_DATA_IN_CHANNEL);
899 return; 896 return;
900 } 897 }
901 898
899 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
902 rb.Push(RESULT_SUCCESS); 900 rb.Push(RESULT_SUCCESS);
903 rb.PushIpcInterface<IStorage>(std::move(*storage)); 901 rb.PushIpcInterface<IStorage>(std::move(*storage));
904 } 902 }