mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-12-27 21:56:42 +00:00
am: Add RequestExit event to AppletMessageQueue
Tested against libnx, signals to games to begin cleanup.
This commit is contained in:
parent
bbc1437188
commit
4c1c8801a5
|
@ -550,6 +550,10 @@ void AppletMessageQueue::OperationModeChanged() {
|
|||
on_operation_mode_changed.writable->Signal();
|
||||
}
|
||||
|
||||
void AppletMessageQueue::RequestExit() {
|
||||
PushMessage(AppletMessage::ExitRequested);
|
||||
}
|
||||
|
||||
ICommonStateGetter::ICommonStateGetter(Core::System& system,
|
||||
std::shared_ptr<AppletMessageQueue> msg_queue)
|
||||
: ServiceFramework("ICommonStateGetter"), system(system), msg_queue(std::move(msg_queue)) {
|
||||
|
|
|
@ -45,6 +45,7 @@ class AppletMessageQueue {
|
|||
public:
|
||||
enum class AppletMessage : u32 {
|
||||
NoMessage = 0,
|
||||
ExitRequested = 4,
|
||||
FocusStateChanged = 15,
|
||||
OperationModeChanged = 30,
|
||||
PerformanceModeChanged = 31,
|
||||
|
@ -59,6 +60,7 @@ public:
|
|||
AppletMessage PopMessage();
|
||||
std::size_t GetMessageCount() const;
|
||||
void OperationModeChanged();
|
||||
void RequestExit();
|
||||
|
||||
private:
|
||||
std::queue<AppletMessage> messages;
|
||||
|
|
Loading…
Reference in a new issue