diff options
| author | 2015-07-23 18:52:57 -0500 | |
|---|---|---|
| committer | 2015-07-23 20:46:11 -0500 | |
| commit | ce31184557361f3905e81e2ab948de976c51c7e4 (patch) | |
| tree | 0e0c8d32173254944e1db376457cd53e2b926c9e /src/core/hle/applets | |
| parent | Merge pull request #977 from yuriks/glenable-tex2d (diff) | |
| download | yuzu-ce31184557361f3905e81e2ab948de976c51c7e4.tar.gz yuzu-ce31184557361f3905e81e2ab948de976c51c7e4.tar.xz yuzu-ce31184557361f3905e81e2ab948de976c51c7e4.zip | |
Service/APT: Return proper parameters in GetLockHandle.
Documented some APT functions
This allows applets to boot.
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 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) | |||
| 89 | return result; | 89 | return result; |
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | bool IsLibraryAppletRunning() { | ||
| 93 | // Check the applets map for instances of any applet | ||
| 94 | for (auto& itr = applets.begin(); itr != applets.end(); ++itr) | ||
| 95 | if (itr->second != nullptr) | ||
| 96 | return true; | ||
| 97 | return false; | ||
| 98 | } | ||
| 99 | |||
| 92 | void Init() { | 100 | void Init() { |
| 93 | // Register the applet update callback | 101 | // Register the applet update callback |
| 94 | applet_update_event = CoreTiming::RegisterEvent("HLE Applet Update Event", AppletUpdateEvent); | 102 | applet_update_event = CoreTiming::RegisterEvent("HLE Applet Update Event", AppletUpdateEvent); |
| 95 | } | 103 | } |
| 96 | 104 | ||
| 97 | void Shutdown() { | 105 | void Shutdown() { |
| 106 | CoreTiming::RemoveEvent(applet_update_event); | ||
| 98 | } | 107 | } |
| 99 | 108 | ||
| 100 | } | 109 | } |
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: | |||
| 67 | Service::APT::AppletId id; ///< Id of this Applet | 67 | Service::APT::AppletId id; ///< Id of this Applet |
| 68 | }; | 68 | }; |
| 69 | 69 | ||
| 70 | /// Returns whether a library applet is currently running | ||
| 71 | bool IsLibraryAppletRunning(); | ||
| 72 | |||
| 70 | /// Initializes the HLE applets | 73 | /// Initializes the HLE applets |
| 71 | void Init(); | 74 | void Init(); |
| 72 | 75 | ||