applet: Move common IsRunning underlying variable to the Applet class

Gets rid of basic duplication.
This commit is contained in:
Lioncash 2016-12-07 17:11:39 -05:00
parent 6f71fb2954
commit f1709b8b59
8 changed files with 19 additions and 28 deletions

View file

@ -52,14 +52,11 @@ static_assert(sizeof(SoftwareKeyboardConfig) == 0x400, "Software Keyboard Config
class SoftwareKeyboard final : public Applet {
public:
SoftwareKeyboard(Service::APT::AppletId id) : Applet(id), started(false) {}
SoftwareKeyboard(Service::APT::AppletId id) : Applet(id) {}
ResultCode ReceiveParameter(const Service::APT::MessageParameter& parameter) override;
ResultCode StartImpl(const Service::APT::AppletStartupParameter& parameter) override;
void Update() override;
bool IsRunning() const override {
return started;
}
/**
* Draws a keyboard to the current bottom screen framebuffer.
@ -72,6 +69,7 @@ public:
*/
void Finalize();
private:
/// This SharedMemory will be created when we receive the LibAppJustStarted message.
/// It holds the framebuffer info retrieved by the application with
/// GSPGPU::ImportDisplayCaptureInfo
@ -82,9 +80,6 @@ public:
/// Configuration of this instance of the SoftwareKeyboard, as received from the application
SoftwareKeyboardConfig config;
/// Whether this applet is currently running instead of the host application or not.
bool started;
};
}
} // namespace