summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/am/am.h
diff options
context:
space:
mode:
authorDavid Marcec <dmarcecguzman@gmail.com>2018-11-07 08:01:33 +0100
committerDavid Marcec <dmarcecguzman@gmail.com>2018-11-07 08:01:33 +0100
commit41e99d8880f4946256344d06b732412ca16c9a13 (patch)
treef7cb2af97284ae6e7c73db24634a36dd73d42698 /src/core/hle/service/am/am.h
parentMerge pull request #1649 from degasus/split_resource_manager (diff)
downloadyuzu-41e99d8880f4946256344d06b732412ca16c9a13.tar
yuzu-41e99d8880f4946256344d06b732412ca16c9a13.tar.gz
yuzu-41e99d8880f4946256344d06b732412ca16c9a13.tar.bz2
yuzu-41e99d8880f4946256344d06b732412ca16c9a13.tar.lz
yuzu-41e99d8880f4946256344d06b732412ca16c9a13.tar.xz
yuzu-41e99d8880f4946256344d06b732412ca16c9a13.tar.zst
yuzu-41e99d8880f4946256344d06b732412ca16c9a13.zip
Diffstat (limited to 'src/core/hle/service/am/am.h')
-rw-r--r--src/core/hle/service/am/am.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h
index 095f94851..4b650ee0b 100644
--- a/src/core/hle/service/am/am.h
+++ b/src/core/hle/service/am/am.h
@@ -5,6 +5,7 @@
#pragma once
#include <memory>
+#include <queue>
#include "core/hle/service/service.h"
namespace Kernel {
@@ -39,6 +40,31 @@ enum SystemLanguage {
TraditionalChinese = 16,
};
+class AppletMessageQueue {
+public:
+ enum class AppletMessage : u32 {
+ NoMessage = 0,
+ FocusStateChanged = 15,
+ OperationModeChanged = 30,
+ PerformanceModeChanged = 31,
+ };
+
+ AppletMessageQueue();
+ ~AppletMessageQueue();
+
+ const Kernel::SharedPtr<Kernel::Event>& GetMesssageRecieveEvent() const;
+ const Kernel::SharedPtr<Kernel::Event>& GetOperationModeChangedEvent() const;
+ void PushMessage(AppletMessage msg);
+ AppletMessage PopMessage();
+ std::size_t GetMessageCount() const;
+ void OperationModeChanged();
+
+private:
+ std::queue<AppletMessage> messages{};
+ Kernel::SharedPtr<Kernel::Event> on_new_message;
+ Kernel::SharedPtr<Kernel::Event> on_operation_mode_changed;
+};
+
class IWindowController final : public ServiceFramework<IWindowController> {
public:
IWindowController();
@@ -102,7 +128,7 @@ private:
class ICommonStateGetter final : public ServiceFramework<ICommonStateGetter> {
public:
- ICommonStateGetter();
+ explicit ICommonStateGetter(std::shared_ptr<AppletMessageQueue> msg_queue);
~ICommonStateGetter() override;
private:
@@ -126,6 +152,7 @@ private:
void GetDefaultDisplayResolution(Kernel::HLERequestContext& ctx);
Kernel::SharedPtr<Kernel::Event> event;
+ std::shared_ptr<AppletMessageQueue> msg_queue;
};
class ILibraryAppletCreator final : public ServiceFramework<ILibraryAppletCreator> {