diff options
| author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2016-12-07 22:36:40 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-07 22:36:40 -0800 |
| commit | bc48e2bda6012b578748608e093d4f9e25b191cd (patch) | |
| tree | 7ab11cf2244d87e8a05c9a316573b910b3054d7c /src/core/hle/applets/applet.h | |
| parent | 2d387d95a8f42a386ab9279e68d0d6edd1ba1aec (diff) | |
| parent | f1709b8b5986af28546877be4c162884118ca161 (diff) | |
Merge pull request #2281 from lioncash/applet
applet: minor interface changes
Diffstat (limited to 'src/core/hle/applets/applet.h')
| -rw-r--r-- | src/core/hle/applets/applet.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/core/hle/applets/applet.h b/src/core/hle/applets/applet.h index bfdcad126..ebeed9813 100644 --- a/src/core/hle/applets/applet.h +++ b/src/core/hle/applets/applet.h @@ -13,8 +13,7 @@ namespace Applets { class Applet { public: - virtual ~Applet() {} - Applet(Service::APT::AppletId id) : id(id) {} + virtual ~Applet() = default; /** * Creates an instance of the Applet subclass identified by the parameter. @@ -48,7 +47,7 @@ public: /** * Whether the applet is currently executing instead of the host application or not. */ - virtual bool IsRunning() const = 0; + bool IsRunning() const; /** * Handles an update tick for the Applet, lets it update the screen, send commands, etc. @@ -56,6 +55,8 @@ public: virtual void Update() = 0; protected: + explicit Applet(Service::APT::AppletId id) : id(id) {} + /** * Handles the Applet start event, triggered from the application. * @param parameter Parameter data to handle. @@ -65,6 +66,9 @@ protected: Service::APT::AppletId id; ///< Id of this Applet std::shared_ptr<std::vector<u8>> heap_memory; ///< Heap memory for this Applet + + /// Whether this applet is currently running instead of the host application or not. + bool is_running = false; }; /// Returns whether a library applet is currently running |
