diff --git a/src/core/hle/kernel/transfer_memory.cpp b/src/core/hle/kernel/transfer_memory.cpp index 1113c815e..689e8e15b 100644 --- a/src/core/hle/kernel/transfer_memory.cpp +++ b/src/core/hle/kernel/transfer_memory.cpp @@ -23,6 +23,8 @@ SharedPtr TransferMemory::Create(KernelCore& kernel, VAddr base_ transfer_memory->owner_permissions = permissions; transfer_memory->owner_process = kernel.CurrentProcess(); + transfer_memory->MapMemory(base_address, size, permissions); + return transfer_memory; } diff --git a/src/core/hle/kernel/wait_object.cpp b/src/core/hle/kernel/wait_object.cpp index c00cef062..e5529ade4 100644 --- a/src/core/hle/kernel/wait_object.cpp +++ b/src/core/hle/kernel/wait_object.cpp @@ -51,17 +51,8 @@ SharedPtr WaitObject::GetHighestPriorityReadyThread() const { if (ShouldWait(thread.get())) continue; - // A thread is ready to run if it's either in ThreadStatus::WaitSynch - // and the rest of the objects it is waiting on are ready. - bool ready_to_run = true; - if (thread_status == ThreadStatus::WaitSynch) { - ready_to_run = thread->AllWaitObjectsReady(); - } - - if (ready_to_run) { - candidate = thread.get(); - candidate_priority = thread->GetPriority(); - } + candidate = thread.get(); + candidate_priority = thread->GetPriority(); } return candidate; diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index ba54b3040..d4cafb2e8 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -847,17 +847,16 @@ private: void PopInteractiveOutData(Kernel::HLERequestContext& ctx) { LOG_DEBUG(Service_AM, "called"); - IPC::ResponseBuilder rb{ctx, 2, 0, 1}; - const auto storage = applet->GetBroker().PopInteractiveDataToGame(); if (storage == nullptr) { LOG_ERROR(Service_AM, "storage is a nullptr. There is no data in the current interactive channel"); - + IPC::ResponseBuilder rb{ctx, 2}; rb.Push(ERR_NO_DATA_IN_CHANNEL); return; } + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; rb.Push(RESULT_SUCCESS); rb.PushIpcInterface(std::move(*storage)); } diff --git a/src/core/hle/service/am/applets/applets.cpp b/src/core/hle/service/am/applets/applets.cpp index 673ad1f7f..1aa2ba769 100644 --- a/src/core/hle/service/am/applets/applets.cpp +++ b/src/core/hle/service/am/applets/applets.cpp @@ -88,6 +88,7 @@ std::unique_ptr AppletDataBroker::PopInteractiveDataToApplet() { void AppletDataBroker::PushNormalDataFromGame(IStorage storage) { in_channel.push_back(std::make_unique(storage)); + pop_out_data_event.writable->Clear(); } void AppletDataBroker::PushNormalDataFromApplet(IStorage storage) { @@ -97,6 +98,7 @@ void AppletDataBroker::PushNormalDataFromApplet(IStorage storage) { void AppletDataBroker::PushInteractiveDataFromGame(IStorage storage) { in_interactive_channel.push_back(std::make_unique(storage)); + pop_interactive_out_data_event.writable->Clear(); } void AppletDataBroker::PushInteractiveDataFromApplet(IStorage storage) { diff --git a/src/core/hle/service/am/applets/software_keyboard.cpp b/src/core/hle/service/am/applets/software_keyboard.cpp index 748559cd0..be36e975e 100644 --- a/src/core/hle/service/am/applets/software_keyboard.cpp +++ b/src/core/hle/service/am/applets/software_keyboard.cpp @@ -91,6 +91,7 @@ void SoftwareKeyboard::ExecuteInteractive() { if (status == INTERACTIVE_STATUS_OK) { complete = true; + broker.SignalStateChanged(); } else { std::array string; std::memcpy(string.data(), data.data() + 4, string.size() * 2);