From 731b4bd69185e741282415b66cc39fd482c039b9 Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Fri, 9 Nov 2018 20:08:25 -0500 Subject: am: Unstub ILibraryAppletAccessor::Start Now starts the applet provided in constructor. --- src/core/hle/service/am/am.cpp | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index b78489df7..4b7aacbac 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -6,10 +6,14 @@ #include #include #include +#include "applets/applets.h" +#include "applets/software_keyboard.h" +#include "audio_core/audio_renderer.h" #include "core/core.h" #include "core/hle/ipc_helpers.h" #include "core/hle/kernel/event.h" #include "core/hle/kernel/process.h" +#include "core/hle/kernel/shared_memory.h" #include "core/hle/service/acc/profile_manager.h" #include "core/hle/service/am/am.h" #include "core/hle/service/am/applet_ae.h" @@ -28,6 +32,10 @@ namespace Service::AM { +enum class AppletId : u32 { + SoftwareKeyboard = 0x11, +}; + constexpr u32 POP_LAUNCH_PARAMETER_MAGIC = 0xC79497CA; struct LaunchParameters { @@ -571,13 +579,17 @@ private: LOG_WARNING(Service_AM, "(STUBBED) called"); } - void Write(Kernel::HLERequestContext& ctx) { - IPC::RequestParser rp{ctx}; + void Start(Kernel::HLERequestContext& ctx) { + ASSERT(applet != nullptr); - const u64 offset{rp.Pop()}; - const std::vector data{ctx.ReadBuffer()}; + applet->Initialize(storage_stack); + interactive_storage_stack.push_back(std::make_shared(applet->Execute())); + state_changed_event->Signal(); + pop_interactive_out_data_event->Signal(); - ASSERT(offset + data.size() <= buffer.size()); + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(RESULT_SUCCESS); + } void PushInData(Kernel::HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; -- cgit v1.2.3