apt: Stub ReplySleepQuery and ReplySleepNotificationComplete. (#7236)

This commit is contained in:
Steveice10 2023-12-08 23:34:54 -08:00 committed by GitHub
parent 24b5ffbfca
commit 070853b465
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 55 additions and 6 deletions

View file

@ -245,6 +245,12 @@ private:
};
static_assert(sizeof(CaptureBufferInfo) == 0x20, "CaptureBufferInfo struct has incorrect size");
enum class SleepQueryReply : u32 {
Reject = 0,
Accept = 1,
Later = 2,
};
class AppletManager : public std::enable_shared_from_this<AppletManager> {
public:
explicit AppletManager(Core::System& system);

View file

@ -935,6 +935,28 @@ void Module::APTInterface::SendDspWakeUp(Kernel::HLERequestContext& ctx) {
rb.Push(apt->applet_manager->SendDspWakeUp(from_app_id, object));
}
void Module::APTInterface::ReplySleepQuery(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx);
const auto from_app_id = rp.PopEnum<AppletId>();
const auto reply_value = rp.PopEnum<SleepQueryReply>();
LOG_WARNING(Service_APT, "(STUBBED) called, from_app_id={:08X}, reply_value={:08X}",
from_app_id, reply_value);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
}
void Module::APTInterface::ReplySleepNotificationComplete(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx);
const auto from_app_id = rp.PopEnum<AppletId>();
LOG_WARNING(Service_APT, "(STUBBED) called, from_app_id={:08X}", from_app_id);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
rb.Push(RESULT_SUCCESS);
}
void Module::APTInterface::PrepareToJumpToHomeMenu(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx);

View file

@ -755,6 +755,27 @@ public:
*/
void SendDspWakeUp(Kernel::HLERequestContext& ctx);
/**
* APT::ReplySleepQuery service function
* Inputs:
* 1 : Source App ID
* 2 : Reply Value
* Outputs:
* 0 : Header code
* 1 : Result code
*/
void ReplySleepQuery(Kernel::HLERequestContext& ctx);
/**
* APT::ReplySleepNotificationComplete service function
* Inputs:
* 1 : Source App ID
* Outputs:
* 0 : Header code
* 1 : Result code
*/
void ReplySleepNotificationComplete(Kernel::HLERequestContext& ctx);
/**
* APT::PrepareToJumpToHomeMenu service function
* Inputs:

View file

@ -72,8 +72,8 @@ APT_A::APT_A(std::shared_ptr<Module> apt)
{0x003B, &APT_A::CancelLibraryApplet, "CancelLibraryApplet"},
{0x003C, &APT_A::SendDspSleep, "SendDspSleep"},
{0x003D, &APT_A::SendDspWakeUp, "SendDspWakeUp"},
{0x003E, nullptr, "ReplySleepQuery"},
{0x003F, nullptr, "ReplySleepNotificationComplete"},
{0x003E, &APT_A::ReplySleepQuery, "ReplySleepQuery"},
{0x003F, &APT_A::ReplySleepNotificationComplete, "ReplySleepNotificationComplete"},
{0x0040, &APT_A::SendCaptureBufferInfo, "SendCaptureBufferInfo"},
{0x0041, &APT_A::ReceiveCaptureBufferInfo, "ReceiveCaptureBufferInfo"},
{0x0042, nullptr, "SleepSystem"},

View file

@ -72,8 +72,8 @@ APT_S::APT_S(std::shared_ptr<Module> apt)
{0x003B, &APT_S::CancelLibraryApplet, "CancelLibraryApplet"},
{0x003C, &APT_S::SendDspSleep, "SendDspSleep"},
{0x003D, &APT_S::SendDspWakeUp, "SendDspWakeUp"},
{0x003E, nullptr, "ReplySleepQuery"},
{0x003F, nullptr, "ReplySleepNotificationComplete"},
{0x003E, &APT_S::ReplySleepQuery, "ReplySleepQuery"},
{0x003F, &APT_S::ReplySleepNotificationComplete, "ReplySleepNotificationComplete"},
{0x0040, &APT_S::SendCaptureBufferInfo, "SendCaptureBufferInfo"},
{0x0041, &APT_S::ReceiveCaptureBufferInfo, "ReceiveCaptureBufferInfo"},
{0x0042, nullptr, "SleepSystem"},

View file

@ -72,8 +72,8 @@ APT_U::APT_U(std::shared_ptr<Module> apt)
{0x003B, &APT_U::CancelLibraryApplet, "CancelLibraryApplet"},
{0x003C, &APT_U::SendDspSleep, "SendDspSleep"},
{0x003D, &APT_U::SendDspWakeUp, "SendDspWakeUp"},
{0x003E, nullptr, "ReplySleepQuery"},
{0x003F, nullptr, "ReplySleepNotificationComplete"},
{0x003E, &APT_U::ReplySleepQuery, "ReplySleepQuery"},
{0x003F, &APT_U::ReplySleepNotificationComplete, "ReplySleepNotificationComplete"},
{0x0040, &APT_U::SendCaptureBufferInfo, "SendCaptureBufferInfo"},
{0x0041, &APT_U::ReceiveCaptureBufferInfo, "ReceiveCaptureBufferInfo"},
{0x0042, nullptr, "SleepSystem"},