diff options
author | bunnei <bunneidev@gmail.com> | 2015-07-29 11:12:17 -0400 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2015-07-29 11:12:17 -0400 |
commit | e5606d9d6ee3edf395e34e9c9034069e1ee9a874 (patch) | |
tree | 6d71689329f7142d855c9d3ea363f15547ce9471 /src/core/hle/applets | |
parent | 97fe935c8a5b658ba16a8930ddc0845ed950be16 (diff) | |
parent | 599744921de3160a1f91b78bc5fa5394c9e09730 (diff) |
Merge pull request #982 from Subv/home
Service/APT: Return proper parameters in GetLockHandle.
Diffstat (limited to 'src/core/hle/applets')
-rw-r--r-- | src/core/hle/applets/applet.cpp | 9 | ||||
-rw-r--r-- | src/core/hle/applets/applet.h | 3 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/core/hle/applets/applet.cpp b/src/core/hle/applets/applet.cpp index 826f6cbb..bc2a1829 100644 --- a/src/core/hle/applets/applet.cpp +++ b/src/core/hle/applets/applet.cpp @@ -89,12 +89,21 @@ ResultCode Applet::Start(const Service::APT::AppletStartupParameter& parameter) return result; } +bool IsLibraryAppletRunning() { + // Check the applets map for instances of any applet + for (auto itr = applets.begin(); itr != applets.end(); ++itr) + if (itr->second != nullptr) + return true; + return false; +} + void Init() { // Register the applet update callback applet_update_event = CoreTiming::RegisterEvent("HLE Applet Update Event", AppletUpdateEvent); } void Shutdown() { + CoreTiming::RemoveEvent(applet_update_event); } } diff --git a/src/core/hle/applets/applet.h b/src/core/hle/applets/applet.h index b235d0b8..af442f81 100644 --- a/src/core/hle/applets/applet.h +++ b/src/core/hle/applets/applet.h @@ -67,6 +67,9 @@ protected: Service::APT::AppletId id; ///< Id of this Applet }; +/// Returns whether a library applet is currently running +bool IsLibraryAppletRunning(); + /// Initializes the HLE applets void Init(); |