summaryrefslogtreecommitdiffstats
path: root/src/core/hle/applets
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2015-07-24 01:52:57 +0200
committerSubv <subv2112@gmail.com>2015-07-24 03:46:11 +0200
commitce31184557361f3905e81e2ab948de976c51c7e4 (patch)
tree0e0c8d32173254944e1db376457cd53e2b926c9e /src/core/hle/applets
parentMerge pull request #977 from yuriks/glenable-tex2d (diff)
downloadyuzu-ce31184557361f3905e81e2ab948de976c51c7e4.tar
yuzu-ce31184557361f3905e81e2ab948de976c51c7e4.tar.gz
yuzu-ce31184557361f3905e81e2ab948de976c51c7e4.tar.bz2
yuzu-ce31184557361f3905e81e2ab948de976c51c7e4.tar.lz
yuzu-ce31184557361f3905e81e2ab948de976c51c7e4.tar.xz
yuzu-ce31184557361f3905e81e2ab948de976c51c7e4.tar.zst
yuzu-ce31184557361f3905e81e2ab948de976c51c7e4.zip
Diffstat (limited to 'src/core/hle/applets')
-rw-r--r--src/core/hle/applets/applet.cpp9
-rw-r--r--src/core/hle/applets/applet.h3
2 files changed, 12 insertions, 0 deletions
diff --git a/src/core/hle/applets/applet.cpp b/src/core/hle/applets/applet.cpp
index 826f6cbb6..e9ab6ffd8 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 b235d0b8a..af442f81d 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();