mirror of
https://github.com/citra-emu/citra-nightly.git
synced 2024-12-27 20:35:35 +00:00
Merge pull request #2192 from Subv/applet_enums
APT/Applets: Renamed the members of the SignalType enum.
This commit is contained in:
commit
6c8857d2bb
|
@ -10,7 +10,7 @@ namespace HLE {
|
||||||
namespace Applets {
|
namespace Applets {
|
||||||
|
|
||||||
ResultCode ErrEula::ReceiveParameter(const Service::APT::MessageParameter& parameter) {
|
ResultCode ErrEula::ReceiveParameter(const Service::APT::MessageParameter& parameter) {
|
||||||
if (parameter.signal != static_cast<u32>(Service::APT::SignalType::LibAppJustStarted)) {
|
if (parameter.signal != static_cast<u32>(Service::APT::SignalType::Request)) {
|
||||||
LOG_ERROR(Service_APT, "unsupported signal %u", parameter.signal);
|
LOG_ERROR(Service_APT, "unsupported signal %u", parameter.signal);
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
// TODO(Subv): Find the right error code
|
// TODO(Subv): Find the right error code
|
||||||
|
@ -36,7 +36,7 @@ ResultCode ErrEula::ReceiveParameter(const Service::APT::MessageParameter& param
|
||||||
|
|
||||||
// Send the response message with the newly created SharedMemory
|
// Send the response message with the newly created SharedMemory
|
||||||
Service::APT::MessageParameter result;
|
Service::APT::MessageParameter result;
|
||||||
result.signal = static_cast<u32>(Service::APT::SignalType::LibAppFinished);
|
result.signal = static_cast<u32>(Service::APT::SignalType::Response);
|
||||||
result.buffer.clear();
|
result.buffer.clear();
|
||||||
result.destination_id = static_cast<u32>(Service::APT::AppletId::Application);
|
result.destination_id = static_cast<u32>(Service::APT::AppletId::Application);
|
||||||
result.sender_id = static_cast<u32>(id);
|
result.sender_id = static_cast<u32>(id);
|
||||||
|
@ -57,7 +57,7 @@ ResultCode ErrEula::StartImpl(const Service::APT::AppletStartupParameter& parame
|
||||||
Service::APT::MessageParameter message;
|
Service::APT::MessageParameter message;
|
||||||
message.buffer.resize(parameter.buffer.size());
|
message.buffer.resize(parameter.buffer.size());
|
||||||
std::fill(message.buffer.begin(), message.buffer.end(), 0);
|
std::fill(message.buffer.begin(), message.buffer.end(), 0);
|
||||||
message.signal = static_cast<u32>(Service::APT::SignalType::LibAppClosed);
|
message.signal = static_cast<u32>(Service::APT::SignalType::WakeupByExit);
|
||||||
message.destination_id = static_cast<u32>(Service::APT::AppletId::Application);
|
message.destination_id = static_cast<u32>(Service::APT::AppletId::Application);
|
||||||
message.sender_id = static_cast<u32>(id);
|
message.sender_id = static_cast<u32>(id);
|
||||||
Service::APT::SendParameter(message);
|
Service::APT::SendParameter(message);
|
||||||
|
|
|
@ -19,7 +19,7 @@ namespace HLE {
|
||||||
namespace Applets {
|
namespace Applets {
|
||||||
|
|
||||||
ResultCode MiiSelector::ReceiveParameter(const Service::APT::MessageParameter& parameter) {
|
ResultCode MiiSelector::ReceiveParameter(const Service::APT::MessageParameter& parameter) {
|
||||||
if (parameter.signal != static_cast<u32>(Service::APT::SignalType::LibAppJustStarted)) {
|
if (parameter.signal != static_cast<u32>(Service::APT::SignalType::Request)) {
|
||||||
LOG_ERROR(Service_APT, "unsupported signal %u", parameter.signal);
|
LOG_ERROR(Service_APT, "unsupported signal %u", parameter.signal);
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
// TODO(Subv): Find the right error code
|
// TODO(Subv): Find the right error code
|
||||||
|
@ -44,7 +44,7 @@ ResultCode MiiSelector::ReceiveParameter(const Service::APT::MessageParameter& p
|
||||||
|
|
||||||
// Send the response message with the newly created SharedMemory
|
// Send the response message with the newly created SharedMemory
|
||||||
Service::APT::MessageParameter result;
|
Service::APT::MessageParameter result;
|
||||||
result.signal = static_cast<u32>(Service::APT::SignalType::LibAppFinished);
|
result.signal = static_cast<u32>(Service::APT::SignalType::Response);
|
||||||
result.buffer.clear();
|
result.buffer.clear();
|
||||||
result.destination_id = static_cast<u32>(Service::APT::AppletId::Application);
|
result.destination_id = static_cast<u32>(Service::APT::AppletId::Application);
|
||||||
result.sender_id = static_cast<u32>(id);
|
result.sender_id = static_cast<u32>(id);
|
||||||
|
@ -73,7 +73,7 @@ ResultCode MiiSelector::StartImpl(const Service::APT::AppletStartupParameter& pa
|
||||||
Service::APT::MessageParameter message;
|
Service::APT::MessageParameter message;
|
||||||
message.buffer.resize(sizeof(MiiResult));
|
message.buffer.resize(sizeof(MiiResult));
|
||||||
std::memcpy(message.buffer.data(), &result, message.buffer.size());
|
std::memcpy(message.buffer.data(), &result, message.buffer.size());
|
||||||
message.signal = static_cast<u32>(Service::APT::SignalType::LibAppClosed);
|
message.signal = static_cast<u32>(Service::APT::SignalType::WakeupByExit);
|
||||||
message.destination_id = static_cast<u32>(Service::APT::AppletId::Application);
|
message.destination_id = static_cast<u32>(Service::APT::AppletId::Application);
|
||||||
message.sender_id = static_cast<u32>(id);
|
message.sender_id = static_cast<u32>(id);
|
||||||
Service::APT::SendParameter(message);
|
Service::APT::SendParameter(message);
|
||||||
|
|
|
@ -22,7 +22,7 @@ namespace HLE {
|
||||||
namespace Applets {
|
namespace Applets {
|
||||||
|
|
||||||
ResultCode SoftwareKeyboard::ReceiveParameter(Service::APT::MessageParameter const& parameter) {
|
ResultCode SoftwareKeyboard::ReceiveParameter(Service::APT::MessageParameter const& parameter) {
|
||||||
if (parameter.signal != static_cast<u32>(Service::APT::SignalType::LibAppJustStarted)) {
|
if (parameter.signal != static_cast<u32>(Service::APT::SignalType::Request)) {
|
||||||
LOG_ERROR(Service_APT, "unsupported signal %u", parameter.signal);
|
LOG_ERROR(Service_APT, "unsupported signal %u", parameter.signal);
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
// TODO(Subv): Find the right error code
|
// TODO(Subv): Find the right error code
|
||||||
|
@ -47,7 +47,7 @@ ResultCode SoftwareKeyboard::ReceiveParameter(Service::APT::MessageParameter con
|
||||||
|
|
||||||
// Send the response message with the newly created SharedMemory
|
// Send the response message with the newly created SharedMemory
|
||||||
Service::APT::MessageParameter result;
|
Service::APT::MessageParameter result;
|
||||||
result.signal = static_cast<u32>(Service::APT::SignalType::LibAppFinished);
|
result.signal = static_cast<u32>(Service::APT::SignalType::Response);
|
||||||
result.buffer.clear();
|
result.buffer.clear();
|
||||||
result.destination_id = static_cast<u32>(Service::APT::AppletId::Application);
|
result.destination_id = static_cast<u32>(Service::APT::AppletId::Application);
|
||||||
result.sender_id = static_cast<u32>(id);
|
result.sender_id = static_cast<u32>(id);
|
||||||
|
@ -108,7 +108,7 @@ void SoftwareKeyboard::Finalize() {
|
||||||
Service::APT::MessageParameter message;
|
Service::APT::MessageParameter message;
|
||||||
message.buffer.resize(sizeof(SoftwareKeyboardConfig));
|
message.buffer.resize(sizeof(SoftwareKeyboardConfig));
|
||||||
std::memcpy(message.buffer.data(), &config, message.buffer.size());
|
std::memcpy(message.buffer.data(), &config, message.buffer.size());
|
||||||
message.signal = static_cast<u32>(Service::APT::SignalType::LibAppClosed);
|
message.signal = static_cast<u32>(Service::APT::SignalType::WakeupByExit);
|
||||||
message.destination_id = static_cast<u32>(Service::APT::AppletId::Application);
|
message.destination_id = static_cast<u32>(Service::APT::AppletId::Application);
|
||||||
message.sender_id = static_cast<u32>(id);
|
message.sender_id = static_cast<u32>(id);
|
||||||
Service::APT::SendParameter(message);
|
Service::APT::SendParameter(message);
|
||||||
|
|
|
@ -523,7 +523,7 @@ void Init() {
|
||||||
notification_event = Kernel::Event::Create(Kernel::ResetType::OneShot, "APT_U:Notification");
|
notification_event = Kernel::Event::Create(Kernel::ResetType::OneShot, "APT_U:Notification");
|
||||||
parameter_event = Kernel::Event::Create(Kernel::ResetType::OneShot, "APT_U:Start");
|
parameter_event = Kernel::Event::Create(Kernel::ResetType::OneShot, "APT_U:Start");
|
||||||
|
|
||||||
next_parameter.signal = static_cast<u32>(SignalType::AppJustStarted);
|
next_parameter.signal = static_cast<u32>(SignalType::Wakeup);
|
||||||
next_parameter.destination_id = 0x300;
|
next_parameter.destination_id = 0x300;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,12 +46,23 @@ static_assert(sizeof(CaptureBufferInfo) == 0x20, "CaptureBufferInfo struct has i
|
||||||
/// Signals used by APT functions
|
/// Signals used by APT functions
|
||||||
enum class SignalType : u32 {
|
enum class SignalType : u32 {
|
||||||
None = 0x0,
|
None = 0x0,
|
||||||
AppJustStarted = 0x1,
|
Wakeup = 0x1,
|
||||||
LibAppJustStarted = 0x2,
|
Request = 0x2,
|
||||||
LibAppFinished = 0x3,
|
Response = 0x3,
|
||||||
LibAppClosed = 0xA,
|
Exit = 0x4,
|
||||||
ReturningToApp = 0xB,
|
Message = 0x5,
|
||||||
ExitingApp = 0xC,
|
HomeButtonSingle = 0x6,
|
||||||
|
HomeButtonDouble = 0x7,
|
||||||
|
DspSleep = 0x8,
|
||||||
|
DspWakeup = 0x9,
|
||||||
|
WakeupByExit = 0xA,
|
||||||
|
WakeupByPause = 0xB,
|
||||||
|
WakeupByCancel = 0xC,
|
||||||
|
WakeupByCancelAll = 0xD,
|
||||||
|
WakeupByPowerButtonClick = 0xE,
|
||||||
|
WakeupToJumpHome = 0xF,
|
||||||
|
RequestForSysApplet = 0x10,
|
||||||
|
WakeupToLaunchApplication = 0x11,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// App Id's used by APT functions
|
/// App Id's used by APT functions
|
||||||
|
|
Loading…
Reference in a new issue