Services/HLE: Implement PrepareToCloseLibraryApplet and CloseLibraryApplet.
This allows LLE library applets (like swkbd) to properly close and return to the application instead of hanging. There is still a bug in our rasterizer cache that may cause crashes some time after an applet is closed, but that is tangential to this change and should be tackled separately.
This commit is contained in:
@ -552,6 +552,31 @@ void Module::Interface::CancelLibraryApplet(Kernel::HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_APT, "(STUBBED) called exiting={}", exiting);
|
||||
}
|
||||
|
||||
void Module::Interface::PrepareToCloseLibraryApplet(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x25, 3, 0); // 0x002500C0
|
||||
bool not_pause = rp.Pop<bool>();
|
||||
bool exiting = rp.Pop<bool>();
|
||||
bool jump_to_home = rp.Pop<bool>();
|
||||
|
||||
LOG_DEBUG(Service_APT, "called not_pause={} exiting={} jump_to_home={}", not_pause, exiting,
|
||||
jump_to_home);
|
||||
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||
rb.Push(apt->applet_manager->PrepareToCloseLibraryApplet(not_pause, exiting, jump_to_home));
|
||||
}
|
||||
|
||||
void Module::Interface::CloseLibraryApplet(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x28, 1, 4); // 0x00280044
|
||||
u32 parameter_size = rp.Pop<u32>();
|
||||
auto object = rp.PopGenericObject();
|
||||
std::vector<u8> buffer = rp.PopStaticBuffer();
|
||||
|
||||
LOG_DEBUG(Service_APT, "called size={}", parameter_size);
|
||||
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||
rb.Push(apt->applet_manager->CloseLibraryApplet(std::move(object), std::move(buffer)));
|
||||
}
|
||||
|
||||
void Module::Interface::SendCaptureBufferInfo(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x40, 1, 2); // 0x00400042
|
||||
u32 size = rp.Pop<u32>();
|
||||
|
Reference in New Issue
Block a user