mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-20 20:49:12 +12:00
Proper applet manager class
This commit is contained in:
parent
f099cc12fa
commit
74f7aeedbb
5 changed files with 45 additions and 26 deletions
|
@ -66,21 +66,7 @@ void APTService::reset() {
|
|||
notificationEvent = std::nullopt;
|
||||
resumeEvent = std::nullopt;
|
||||
|
||||
miiSelector.reset();
|
||||
}
|
||||
|
||||
Applets::AppletBase* APTService::getApplet(u32 id) {
|
||||
using namespace Applets;
|
||||
|
||||
switch (id) {
|
||||
case AppletIDs::MiiSelector:
|
||||
case AppletIDs::MiiSelector2: return &miiSelector;
|
||||
|
||||
case AppletIDs::SoftwareKeyboard:
|
||||
case AppletIDs::SoftwareKeyboard2: return &swkbd;
|
||||
|
||||
default: return nullptr;
|
||||
}
|
||||
appletManager.reset();
|
||||
}
|
||||
|
||||
void APTService::handleSyncRequest(u32 messagePointer) {
|
||||
|
@ -264,7 +250,7 @@ void APTService::sendParameter(u32 messagePointer) {
|
|||
Helpers::warn("APT::SendParameter: Unimplemented source applet ID");
|
||||
}
|
||||
|
||||
Applets::AppletBase* destApplet = getApplet(destAppID);
|
||||
Applets::AppletBase* destApplet = appletManager.getApplet(destAppID);
|
||||
if (destApplet == nullptr) {
|
||||
Helpers::warn("APT::SendParameter: Unimplemented dest applet ID");
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue