summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Sebastian Valle2016-11-19 20:30:26 -0500
committerGravatar GitHub2016-11-19 20:30:26 -0500
commit6c8857d2bb34059c6306e92a4daa4a619266c30a (patch)
treea78815f668f98aae05cb01e8f909edcc810176ab /src/core
parentMerge pull request #2194 from jroweboy/extremely-minor-clangformat-change (diff)
parentAPT/Applets: Renamed the members of the SignalType enum. (diff)
downloadyuzu-6c8857d2bb34059c6306e92a4daa4a619266c30a.tar.gz
yuzu-6c8857d2bb34059c6306e92a4daa4a619266c30a.tar.xz
yuzu-6c8857d2bb34059c6306e92a4daa4a619266c30a.zip
Merge pull request #2192 from Subv/applet_enums
APT/Applets: Renamed the members of the SignalType enum.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/applets/erreula.cpp6
-rw-r--r--src/core/hle/applets/mii_selector.cpp6
-rw-r--r--src/core/hle/applets/swkbd.cpp6
-rw-r--r--src/core/hle/service/apt/apt.cpp2
-rw-r--r--src/core/hle/service/apt/apt.h23
5 files changed, 27 insertions, 16 deletions
diff --git a/src/core/hle/applets/erreula.cpp b/src/core/hle/applets/erreula.cpp
index 14964427b..e1379ac4d 100644
--- a/src/core/hle/applets/erreula.cpp
+++ b/src/core/hle/applets/erreula.cpp
@@ -10,7 +10,7 @@ namespace HLE {
10namespace Applets { 10namespace Applets {
11 11
12ResultCode ErrEula::ReceiveParameter(const Service::APT::MessageParameter& parameter) { 12ResultCode ErrEula::ReceiveParameter(const Service::APT::MessageParameter& parameter) {
13 if (parameter.signal != static_cast<u32>(Service::APT::SignalType::LibAppJustStarted)) { 13 if (parameter.signal != static_cast<u32>(Service::APT::SignalType::Request)) {
14 LOG_ERROR(Service_APT, "unsupported signal %u", parameter.signal); 14 LOG_ERROR(Service_APT, "unsupported signal %u", parameter.signal);
15 UNIMPLEMENTED(); 15 UNIMPLEMENTED();
16 // TODO(Subv): Find the right error code 16 // TODO(Subv): Find the right error code
@@ -36,7 +36,7 @@ ResultCode ErrEula::ReceiveParameter(const Service::APT::MessageParameter& param
36 36
37 // Send the response message with the newly created SharedMemory 37 // Send the response message with the newly created SharedMemory
38 Service::APT::MessageParameter result; 38 Service::APT::MessageParameter result;
39 result.signal = static_cast<u32>(Service::APT::SignalType::LibAppFinished); 39 result.signal = static_cast<u32>(Service::APT::SignalType::Response);
40 result.buffer.clear(); 40 result.buffer.clear();
41 result.destination_id = static_cast<u32>(Service::APT::AppletId::Application); 41 result.destination_id = static_cast<u32>(Service::APT::AppletId::Application);
42 result.sender_id = static_cast<u32>(id); 42 result.sender_id = static_cast<u32>(id);
@@ -57,7 +57,7 @@ ResultCode ErrEula::StartImpl(const Service::APT::AppletStartupParameter& parame
57 Service::APT::MessageParameter message; 57 Service::APT::MessageParameter message;
58 message.buffer.resize(parameter.buffer.size()); 58 message.buffer.resize(parameter.buffer.size());
59 std::fill(message.buffer.begin(), message.buffer.end(), 0); 59 std::fill(message.buffer.begin(), message.buffer.end(), 0);
60 message.signal = static_cast<u32>(Service::APT::SignalType::LibAppClosed); 60 message.signal = static_cast<u32>(Service::APT::SignalType::WakeupByExit);
61 message.destination_id = static_cast<u32>(Service::APT::AppletId::Application); 61 message.destination_id = static_cast<u32>(Service::APT::AppletId::Application);
62 message.sender_id = static_cast<u32>(id); 62 message.sender_id = static_cast<u32>(id);
63 Service::APT::SendParameter(message); 63 Service::APT::SendParameter(message);
diff --git a/src/core/hle/applets/mii_selector.cpp b/src/core/hle/applets/mii_selector.cpp
index 53a8683a4..3455b9201 100644
--- a/src/core/hle/applets/mii_selector.cpp
+++ b/src/core/hle/applets/mii_selector.cpp
@@ -19,7 +19,7 @@ namespace HLE {
19namespace Applets { 19namespace Applets {
20 20
21ResultCode MiiSelector::ReceiveParameter(const Service::APT::MessageParameter& parameter) { 21ResultCode MiiSelector::ReceiveParameter(const Service::APT::MessageParameter& parameter) {
22 if (parameter.signal != static_cast<u32>(Service::APT::SignalType::LibAppJustStarted)) { 22 if (parameter.signal != static_cast<u32>(Service::APT::SignalType::Request)) {
23 LOG_ERROR(Service_APT, "unsupported signal %u", parameter.signal); 23 LOG_ERROR(Service_APT, "unsupported signal %u", parameter.signal);
24 UNIMPLEMENTED(); 24 UNIMPLEMENTED();
25 // TODO(Subv): Find the right error code 25 // TODO(Subv): Find the right error code
@@ -44,7 +44,7 @@ ResultCode MiiSelector::ReceiveParameter(const Service::APT::MessageParameter& p
44 44
45 // Send the response message with the newly created SharedMemory 45 // Send the response message with the newly created SharedMemory
46 Service::APT::MessageParameter result; 46 Service::APT::MessageParameter result;
47 result.signal = static_cast<u32>(Service::APT::SignalType::LibAppFinished); 47 result.signal = static_cast<u32>(Service::APT::SignalType::Response);
48 result.buffer.clear(); 48 result.buffer.clear();
49 result.destination_id = static_cast<u32>(Service::APT::AppletId::Application); 49 result.destination_id = static_cast<u32>(Service::APT::AppletId::Application);
50 result.sender_id = static_cast<u32>(id); 50 result.sender_id = static_cast<u32>(id);
@@ -73,7 +73,7 @@ ResultCode MiiSelector::StartImpl(const Service::APT::AppletStartupParameter& pa
73 Service::APT::MessageParameter message; 73 Service::APT::MessageParameter message;
74 message.buffer.resize(sizeof(MiiResult)); 74 message.buffer.resize(sizeof(MiiResult));
75 std::memcpy(message.buffer.data(), &result, message.buffer.size()); 75 std::memcpy(message.buffer.data(), &result, message.buffer.size());
76 message.signal = static_cast<u32>(Service::APT::SignalType::LibAppClosed); 76 message.signal = static_cast<u32>(Service::APT::SignalType::WakeupByExit);
77 message.destination_id = static_cast<u32>(Service::APT::AppletId::Application); 77 message.destination_id = static_cast<u32>(Service::APT::AppletId::Application);
78 message.sender_id = static_cast<u32>(id); 78 message.sender_id = static_cast<u32>(id);
79 Service::APT::SendParameter(message); 79 Service::APT::SendParameter(message);
diff --git a/src/core/hle/applets/swkbd.cpp b/src/core/hle/applets/swkbd.cpp
index 06ddf538b..1e21337f5 100644
--- a/src/core/hle/applets/swkbd.cpp
+++ b/src/core/hle/applets/swkbd.cpp
@@ -22,7 +22,7 @@ namespace HLE {
22namespace Applets { 22namespace Applets {
23 23
24ResultCode SoftwareKeyboard::ReceiveParameter(Service::APT::MessageParameter const& parameter) { 24ResultCode SoftwareKeyboard::ReceiveParameter(Service::APT::MessageParameter const& parameter) {
25 if (parameter.signal != static_cast<u32>(Service::APT::SignalType::LibAppJustStarted)) { 25 if (parameter.signal != static_cast<u32>(Service::APT::SignalType::Request)) {
26 LOG_ERROR(Service_APT, "unsupported signal %u", parameter.signal); 26 LOG_ERROR(Service_APT, "unsupported signal %u", parameter.signal);
27 UNIMPLEMENTED(); 27 UNIMPLEMENTED();
28 // TODO(Subv): Find the right error code 28 // TODO(Subv): Find the right error code
@@ -47,7 +47,7 @@ ResultCode SoftwareKeyboard::ReceiveParameter(Service::APT::MessageParameter con
47 47
48 // Send the response message with the newly created SharedMemory 48 // Send the response message with the newly created SharedMemory
49 Service::APT::MessageParameter result; 49 Service::APT::MessageParameter result;
50 result.signal = static_cast<u32>(Service::APT::SignalType::LibAppFinished); 50 result.signal = static_cast<u32>(Service::APT::SignalType::Response);
51 result.buffer.clear(); 51 result.buffer.clear();
52 result.destination_id = static_cast<u32>(Service::APT::AppletId::Application); 52 result.destination_id = static_cast<u32>(Service::APT::AppletId::Application);
53 result.sender_id = static_cast<u32>(id); 53 result.sender_id = static_cast<u32>(id);
@@ -108,7 +108,7 @@ void SoftwareKeyboard::Finalize() {
108 Service::APT::MessageParameter message; 108 Service::APT::MessageParameter message;
109 message.buffer.resize(sizeof(SoftwareKeyboardConfig)); 109 message.buffer.resize(sizeof(SoftwareKeyboardConfig));
110 std::memcpy(message.buffer.data(), &config, message.buffer.size()); 110 std::memcpy(message.buffer.data(), &config, message.buffer.size());
111 message.signal = static_cast<u32>(Service::APT::SignalType::LibAppClosed); 111 message.signal = static_cast<u32>(Service::APT::SignalType::WakeupByExit);
112 message.destination_id = static_cast<u32>(Service::APT::AppletId::Application); 112 message.destination_id = static_cast<u32>(Service::APT::AppletId::Application);
113 message.sender_id = static_cast<u32>(id); 113 message.sender_id = static_cast<u32>(id);
114 Service::APT::SendParameter(message); 114 Service::APT::SendParameter(message);
diff --git a/src/core/hle/service/apt/apt.cpp b/src/core/hle/service/apt/apt.cpp
index c4bd65986..c7198293e 100644
--- a/src/core/hle/service/apt/apt.cpp
+++ b/src/core/hle/service/apt/apt.cpp
@@ -523,7 +523,7 @@ void Init() {
523 notification_event = Kernel::Event::Create(Kernel::ResetType::OneShot, "APT_U:Notification"); 523 notification_event = Kernel::Event::Create(Kernel::ResetType::OneShot, "APT_U:Notification");
524 parameter_event = Kernel::Event::Create(Kernel::ResetType::OneShot, "APT_U:Start"); 524 parameter_event = Kernel::Event::Create(Kernel::ResetType::OneShot, "APT_U:Start");
525 525
526 next_parameter.signal = static_cast<u32>(SignalType::AppJustStarted); 526 next_parameter.signal = static_cast<u32>(SignalType::Wakeup);
527 next_parameter.destination_id = 0x300; 527 next_parameter.destination_id = 0x300;
528} 528}
529 529
diff --git a/src/core/hle/service/apt/apt.h b/src/core/hle/service/apt/apt.h
index a118cda1f..cbcba96a5 100644
--- a/src/core/hle/service/apt/apt.h
+++ b/src/core/hle/service/apt/apt.h
@@ -46,12 +46,23 @@ static_assert(sizeof(CaptureBufferInfo) == 0x20, "CaptureBufferInfo struct has i
46/// Signals used by APT functions 46/// Signals used by APT functions
47enum class SignalType : u32 { 47enum class SignalType : u32 {
48 None = 0x0, 48 None = 0x0,
49 AppJustStarted = 0x1, 49 Wakeup = 0x1,
50 LibAppJustStarted = 0x2, 50 Request = 0x2,
51 LibAppFinished = 0x3, 51 Response = 0x3,
52 LibAppClosed = 0xA, 52 Exit = 0x4,
53 ReturningToApp = 0xB, 53 Message = 0x5,
54 ExitingApp = 0xC, 54 HomeButtonSingle = 0x6,
55 HomeButtonDouble = 0x7,
56 DspSleep = 0x8,
57 DspWakeup = 0x9,
58 WakeupByExit = 0xA,
59 WakeupByPause = 0xB,
60 WakeupByCancel = 0xC,
61 WakeupByCancelAll = 0xD,
62 WakeupByPowerButtonClick = 0xE,
63 WakeupToJumpHome = 0xF,
64 RequestForSysApplet = 0x10,
65 WakeupToLaunchApplication = 0x11,
55}; 66};
56 67
57/// App Id's used by APT functions 68/// App Id's used by APT functions