yuzu-emu
/
yuzu-android
Archived
1
0
Fork 0

am: Add RequestExit event to AppletMessageQueue

Tested against libnx, signals to games to begin cleanup.
This commit is contained in:
Zach Hilman 2019-07-06 13:09:27 -04:00
parent bbc1437188
commit 4c1c8801a5
2 changed files with 6 additions and 0 deletions

View File

@ -550,6 +550,10 @@ void AppletMessageQueue::OperationModeChanged() {
on_operation_mode_changed.writable->Signal(); on_operation_mode_changed.writable->Signal();
} }
void AppletMessageQueue::RequestExit() {
PushMessage(AppletMessage::ExitRequested);
}
ICommonStateGetter::ICommonStateGetter(Core::System& system, ICommonStateGetter::ICommonStateGetter(Core::System& system,
std::shared_ptr<AppletMessageQueue> msg_queue) std::shared_ptr<AppletMessageQueue> msg_queue)
: ServiceFramework("ICommonStateGetter"), system(system), msg_queue(std::move(msg_queue)) { : ServiceFramework("ICommonStateGetter"), system(system), msg_queue(std::move(msg_queue)) {

View File

@ -45,6 +45,7 @@ class AppletMessageQueue {
public: public:
enum class AppletMessage : u32 { enum class AppletMessage : u32 {
NoMessage = 0, NoMessage = 0,
ExitRequested = 4,
FocusStateChanged = 15, FocusStateChanged = 15,
OperationModeChanged = 30, OperationModeChanged = 30,
PerformanceModeChanged = 31, PerformanceModeChanged = 31,
@ -59,6 +60,7 @@ public:
AppletMessage PopMessage(); AppletMessage PopMessage();
std::size_t GetMessageCount() const; std::size_t GetMessageCount() const;
void OperationModeChanged(); void OperationModeChanged();
void RequestExit();
private: private:
std::queue<AppletMessage> messages; std::queue<AppletMessage> messages;