mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-05-30 02:19:10 +12:00
Proper applet manager class
This commit is contained in:
parent
f099cc12fa
commit
74f7aeedbb
5 changed files with 45 additions and 26 deletions
21
src/core/applets/applet_manager.cpp
Normal file
21
src/core/applets/applet_manager.cpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
#include "applets/applet_manager.hpp"
|
||||
using namespace Applets;
|
||||
|
||||
AppletManager::AppletManager(Memory& mem) : miiSelector(mem), swkbd(mem) {}
|
||||
|
||||
void AppletManager::reset() {
|
||||
miiSelector.reset();
|
||||
swkbd.reset();
|
||||
}
|
||||
|
||||
AppletBase* AppletManager::getApplet(u32 id) {
|
||||
switch (id) {
|
||||
case AppletIDs::MiiSelector:
|
||||
case AppletIDs::MiiSelector2: return &miiSelector;
|
||||
|
||||
case AppletIDs::SoftwareKeyboard:
|
||||
case AppletIDs::SoftwareKeyboard2: return &swkbd;
|
||||
|
||||
default: return nullptr;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue