applet: Fix HLE applet pre-start lifecycle. (#6362)

This commit is contained in:
Steveice10 2023-03-25 14:36:14 -07:00 committed by GitHub
parent 44097c2a8d
commit d9d0fc63ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 23 additions and 11 deletions

View file

@ -40,10 +40,15 @@ public:
ResultCode ReceiveParameter(const Service::APT::MessageParameter& parameter);
/**
* Whether the applet is currently executing instead of the host application or not.
* Whether the applet is currently running.
*/
[[nodiscard]] bool IsRunning() const;
/**
* Whether the applet is currently active instead of the host application or not.
*/
[[nodiscard]] bool IsActive() const;
/**
* Handles an update tick for the Applet, lets it update the screen, send commands, etc.
*/
@ -79,8 +84,11 @@ protected:
bool preload; ///< Whether the Applet is being preloaded.
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;
/// Whether this applet is running.
bool is_running = true;
/// Whether this applet is currently active instead of the host application or not.
bool is_active = false;
void SendParameter(const Service::APT::MessageParameter& parameter);
void CloseApplet(std::shared_ptr<Kernel::Object> object, const std::vector<u8>& buffer);